Overview
The JSONata command provides functionality for:- Evaluating complex transformation expressions against JSON data
- Outputting results to the
datafield orchildrenarray - Setting an evaluation timeout to prevent runaway expressions
Command Type
Command Type ID: 1022Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| expression | string | Inline JSONata expression string | Yes |
| timeout | number | Timeout for evaluation in milliseconds | Yes |
| key | string | Where to store the evaluation result. "data" (default) stores in data field; "children" stores in children array (result must be an array). Possible values: "data", "children" | No |
Usage Examples
Sum a Field Across an Array
Transform and Restructure Data
Filter with Expression
String Concatenation
Output Key Options
| Value | Behaviour |
|---|---|
"data" | Stores the expression result in the data field (default) |
"children" | Stores the expression result in the children array — result must be an array |
Common Use Cases
- Aggregations: Sum, average, or count values across arrays
- Complex Transformations: Reshape data structures in a single expressive step
- Conditional Logic: Apply conditional transformations without multiple commands
- String Formatting: Concatenate or format string fields
Related Commands
- Transform By JDM - Transform data using JDM mapping rules
- Zen Parse Expression - Evaluate Zen expressions
- Json Path - Extract data using JSONPath