Concatenation
A mapped string that contains a| is built rather than looked up. The engine splits the string on every |, resolves each segment that begins with $., leaves every other segment as literal text, and joins the pieces.
| is the only reason to reach for this form — a mapping with no | never interpolates, so "Order $.trigger.id" stays exactly as written.
The rules
A leading or trailing| produces an empty segment, which contributes nothing. That makes "$.a.b|" a way of forcing a value to a string.
Line breaks inside a literal segment are kept, so a multi-line template works as written.
How each value is stringified
Objects and arrays are serialised as JSON, not as
[object Object].Forcing a key to exist
A path that matches nothing resolves to[] and the key stays in the output holding an empty array. A trailing | turns that into "", which is usually easier to consume downstream.
{"user": {"name": "Alice"}}:
| converts all three to strings.
What it cannot do
Supply a default value
Supply a default value
$.order.status|pending does not fall back to "pending". Both segments are emitted, so with a status of shipped the result is "shippedpending", and with no status at all it is "pending" — right by accident in one case and wrong in the other.Put the default in the literal text instead, where the intent is visible: "Status: |$.order.status" yields "Status: shipped" or "Status: ". For a genuine fallback, use an Eval step.Choose between two values
Choose between two values
$.customer.tier===premium|high|normal is not a conditional. It resolves to "highnormal" whatever the data holds — the first segment does not start with $., so it is emitted literally and evaluates nothing.Branching belongs in a Condition step or a Rules step.Emit a literal | character
Emit a literal | character
Every
| is a delimiter and there is no escape. $.x| | |$.y splits into five segments and produces "1 2" — two spaces, no bar. A pipe-separated string has to be assembled in an Eval step.Appear anywhere in a JSONPath expression
Appear anywhere in a JSONPath expression
Because the split happens before JSONPath sees the string, a
| inside a filter destroys it. $.users[?(@.role==='admin' || @.role==='moderator')] fails the step with Unexpected "?" at character 0. There is no way to write OR in a filter.Next steps
JSONPath
Every selector and filter that works
Examples
Worked mappings, run end to end
Eval Step
Formatting, defaults and conditionals
Overview
Data sources, path shapes, failure modes