Working with JSON
Almost every Wrkflow works with JSON. App integrations and API Wrk Actions return JSON response bodies. Downstream Wrk Actions usually need specific values from those bodies, not the full payload.
The Data Manipulation suite in the Wrk Action library includes a JSON category for that work. The two Wrk Actions you will use most often are Retrieve values from JSON and Retrieve all items from a JSON array. Together they cover most extraction and per-item processing patterns on the platform.

Retrieve values from JSON
Use Retrieve values from JSON when you have a JSON object (or a single item) and need named values for later steps.
- Pass the JSON into the Wrk Action (usually from a previous API response in the Data Library).
- Specify one or more JSON Path expressions for the fields you need.
- Map each path to a Custom Output with a unique, high-context name.
Those Custom Outputs become Data Library items you can bind into downstream Wrk Action inputs. Prefer clear names such as customer_email or invoice_total so later configuration stays readable.
Use this Wrk Action for nested paths, JSON Path functions, and for pulling several fields from one payload in a single step. For simple top-level key aliases on an existing Wrk Action output, Custom Outputs alone can be enough.
Retrieve all items from a JSON array
Use Retrieve all items from a JSON array when the payload is an array and you want every item processed by the steps that follow.
This Wrk Action divides on the array. Downstream Wrk Actions run once per item, in parallel. That is similar to multi-threading: faster execution when items are independent. Because of that:
- Items cannot share state or talk to each other while they run
- Items are not processed in a guaranteed order
For more on how divides work, see Divides.
You can also define Custom Outputs that match top-level field names on each array item. Wrk extracts those field values automatically for each divided item.
Nested fields inside array items
If you need values nested inside each object in the array, pair the two Wrk Actions:
- Retrieve all items from a JSON array to divide on the array (and optionally extract top-level fields).
- Retrieve values from JSON on each item to pull nested paths into Custom Outputs.
That combination is the most common way to work with JSON and JSON arrays on Wrk.
Filter, aggregate, or order before you process
If the array needs aggregation, filtering, or ordering before you divide or extract fields, use Query JSON using SQL first. Run your SQL against the JSON, then pass the result into Retrieve all items from a JSON array or Retrieve values from JSON as needed.
Which Wrk Action to use
| Goal | Wrk Action |
|---|---|
| Extract one or more fields (including nested paths) from a JSON object | Retrieve values from JSON |
| Process every item in a JSON array in parallel | Retrieve all items from a JSON array |
| Nested fields on each array item | Divide with Retrieve all items from a JSON array, then Retrieve values from JSON |
| Filter, aggregate, or reorder JSON before processing | Query JSON using SQL |
| Alias a top-level JSON key on an existing Wrk Action output | Custom Outputs |
Video overview
This video covers:
- Using JSON Path to retrieve values from JSON
- Using SQL to transform and aggregate JSON
Related resources
- Custom Outputs: name extracted values for the Data Library
- Data Library Items: bind those values into later Wrk Actions
- Retrieve values from JSON: JSON Path extraction reference
- Retrieve all items from a JSON array: divide a JSON array for parallel processing
- Query JSON using SQL: filter, aggregate, and order JSON with SQLite syntax
- Divides: how parallel item processing works
- Data Manipulation: browse the JSON category and related Wrk Actions
- Loop basics: Custom Outputs: extract fields while looping a JSON array
- Configuring Long Text Fields: insert Data Library items into long text inputs