json-filter (Transform Node)
The JSON Filter node applies a JMESPath expression to JSON emitted by an upstream node and returns only the selected subset.
Use this node as a generic JSON shaping/filtering step before downstream transforms or dashboard nodes.
Configuration Schema
| Property | Type | Required | Description |
|---|---|---|---|
expression | string | Yes | JMESPath expression evaluated against the upstream JSON payload. |
Notes:
json-filteraccepts a single input (acceptsMultipleInputs: false).- Configuration requires
expressionand disallows additional properties.
How it works
At runtime, the processor:
- Fetches latest upstream input (
fetch_latest_inputs). - Takes the first payload from the input map.
- Parses payload as JSON.
- Evaluates
jmespath.search(expression, parsedJson). - Returns the filtered value for runtime output persistence.
Output can be an object, array, scalar, or boolean, as long as it is JSON-serializable.
Example
Input JSON:
[
{ "userId": "u1", "score": 10, "status": "green" },
{ "userId": "u2", "score": 15, "status": "amber" },
{ "userId": "u1", "score": 20, "status": "green" }
]Node configuration:
{
"expression": "[?userId=='u1']"
}Output JSON:
[
{ "userId": "u1", "score": 10, "status": "green" },
{ "userId": "u1", "score": 20, "status": "green" }
]Example configuration patterns
Filter by session-scoped user:
{
"expression": "records[?userId=='$SESSION.userId']"
}Select first item from a list:
{
"expression": "* | [0]"
}Project specific fields into a compact shape:
{
"expression": "events[].{time: timestamp, value: metrics.score}"
}Runtime failure behavior
The node fails intentionally in the following cases:
- No upstream input is available.
expressionis missing from configuration.- Input payload cannot be parsed as JSON.
- JMESPath evaluation raises an error.
- JMESPath completes but returns
null/ no match (filtered is None).
Important behavior notes:
- Empty list (
[]) is notNone, so the processor returns it. Downstream runtime handling may still treat empty outputs as failure depending on core runtime rules. - Validation requires
expressionto be a string.
Integration in a session template
- Place
json-filterafter any node that outputs JSON. - Configure
expressionto select the exact structure downstream nodes need. - Connect downstream nodes (for example
dashboardordashboard-v2) to consume the filtered payload. - Reuse the same node pattern across projects by changing only JMESPath expressions.