Examples
Every mapping on this page was run through the resolver the flow uses, against the data shown. The outputs are what the engine returned, including the awkward parts.Building a message payload
Query, concatenation and a nested object in one mapping.$.…items.length counts an array; $.…items[*].sku collects a field from every element.
- Flow data
- Mapping
- Result
total stays a number and line_count stays an integer. Only the two | strings become text.
Filtering a list
The same mapping, three filters, three different result shapes.- Flow data
- Mapping
- Result
[?(@.priority==='high' || @.priority==='urgent')] fails the step — the | characters are consumed as concatenation delimiters before JSONPath sees them. Two separate keys, or an Eval step, are the way round it.
Flattening a nested response
A JSONPath key is resolved like any other expression, so a record can be keyed by a value from the run.- Flow data
- Mapping
- Result
phone is the four-character string "null", not an empty string — the property exists and holds null, and a trailing | stringifies whatever it finds. Only a path that matches nothing produces "".Searching a tree
.. finds a field at any depth. @root reaches back to the whole data object from inside a filter.
- Flow data
- Mapping
- Result
$.trigger.region inside the filter instead of @root.trigger.region fails the step with $ is not defined.
Building a URL
Concatenation joins literal text with resolved values.$.static holds the flow’s Static Data and $.env holds the run’s own metadata.
- Flow data
- Mapping
- Result
What a missing value looks like
- Flow data
- Mapping
- Result
| a missing value is an empty array; with one it is an empty string.
Next steps
JSONPath
Every selector and filter that works
Concatenation
Building strings with
|Map Step
The step whose entire job is a mapping
Eval Step
Logic that JSONPath cannot express