Overview
The Zen Parse Expression command provides functionality for:- Evaluating
expressiontype Zen expressions that return transformed data - Evaluating
unarytype boolean conditions against the root context ($) - Storing results in the
datafield orchildrenarray
Command Type
Command Type ID: 1020Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| evaluationType | string | The type of evaluation. "expression" returns transformed data; "unary" evaluates a boolean condition against $. Possible values: "expression", "unary" | Yes |
| expression | string | The Zen expression to evaluate. For expression: use object construction like ( key: value ). For unary: use boolean conditions like $.value > 10 | Yes |
| timeout | number | Timeout for the evaluation in milliseconds | Yes |
| key | string | Where to store the result. "data" (default) stores in data field; "children" stores in children array (must be array). Possible values: "data", "children" | No |
Usage Examples
Evaluate an Expression
Evaluate a Unary Condition
Output to Children Array
Evaluation Types
| Type | Description | Expression Example |
|---|---|---|
expression | Returns transformed data using object construction syntax | ( id: $.id, value: $.price * 1.1 ) |
unary | Returns a boolean — evaluates a condition against root context $ | $.status = 'active' |
Output Key Options
| Value | Behaviour |
|---|---|
"data" | Stores the result in the data field (default) |
"children" | Stores the result in the children array — result must be an array |
Common Use Cases
- Conditional Filtering: Use unary mode to evaluate pass/fail conditions in the pipeline
- Data Reshaping: Use expression mode to produce a new object structure
- Lightweight Transforms: Apply simple Zen expressions without the full JDM graph overhead
Related Commands
- JSONata - Evaluate JSONata expressions against input data
- Transform By JDM - Transform data using full JDM rules
- Filter - Filter collections based on field values