|) is a QuivaWorks-specific extension that enables powerful string concatenation and handling of missing values. It’s one of the most frequently used features for building dynamic content.
The pipe operator is not part of standard JSONPath. It’s a custom QuivaWorks feature designed to make string building easier and more intuitive.
How It Works
The pipe operator splits your expression into segments and concatenates them:- Static text segments are included as-is
- Variable mappings (starting with
$.) are evaluated and inserted - All segments are converted to strings and joined together
Important: The pipe operator forces string conversion of all values. This means objects, arrays, and primitives are all converted to strings during concatenation.
Pipe Operator with Different Data Types
The trailing pipe (|) has special behavior depending on the data type:
- Strings & Primitives
- Arrays
- Objects
- Missing Data
Mapping
With Data
Result (same for both)
Working with Arrays
The pipe operator provides convenient ways to work with array data.- Join Array Elements
- Custom Separators
- Preserve Array Structure
Mapping
With Data
Result
Working with Objects
When working with nested objects, be careful with the pipe operator.- Access Nested Properties
- Preserve Object Structure
- Avoid Pipe with Objects
Mapping
With Data
Result
- Simple Text
- Multiple Variables
- No Static Text
Mapping
With Data
Result
Joining Values
Use the pipe operator with a separator to join multiple values.- Space Separator
- Custom Separators
- Multi-line Content
Mapping
Result
| | adds a space between values.Handling Missing Values
The pipe operator provides elegant solutions for handling missing or undefined data.- Empty String Default
- Default Text
- Without Pipe Operator
Mapping
With Data (missing properties)
Result
Building URLs and Endpoints
Construct dynamic URLs using the pipe operator.- API Endpoints
- File Paths
- Query Parameters
Mapping
With Data
Result
Email and Message Templates
Create personalized email content and notifications.- Email Subject Lines
- Email Bodies
- SMS Messages
- Push Notifications
Mapping
Complex Concatenation
Combine multiple data sources and formats.- Formatted Data
- Conditional Text
- Mixed Data Types
JSONPath with Pipe Operator
Combine JSONPath queries with string concatenation.- Array Properties
- Nested Access
- With Filters
Mapping
Common Patterns
Full Name
Full Name
Full Address
Full Address
Formatted Dates
Formatted Dates
Currency Formatting
Currency Formatting
List Items
List Items
$.tags| to join simple arrays. For arrays of objects, access individual items.Array vs String
Array vs String
Best Practices
1
Use Trailing Pipes for Optional Fields
Add
| at the end when you want to ensure empty strings instead of undefined:2
Be Consistent with Spacing
Choose a spacing style and stick with it:
3
Handle Missing Data Gracefully
Structure your templates to work even when optional data is missing:
4
Test with Missing Values
Always test your pipe expressions with partial data to ensure they degrade gracefully.
5
Keep It Readable
For complex concatenations, consider breaking into multiple fields:
Performance Tips
Efficient
Simple concatenations with few variables:
Less Efficient
Complex expressions with many variables:
Debugging Tips
Missing Values
Missing Values
If parts of your string are missing:
- Check that the source path exists
- Verify the node has executed
- Use the Flow tester to inspect data
- Add trailing pipes to see empty strings:
$.value|
Unexpected Output
Unexpected Output
If concatenation doesn’t work as expected:
- Verify
$.prefix on all variable paths - Check for typos in node IDs or property names
- Test each variable separately first
- Ensure all segments are separated by
|
Special Characters
Special Characters
If you need a literal pipe character in your output:Unfortunately, there’s no escape for literal
| in pipe expressions. Consider:- Using a different character
- Building the string in multiple steps
- Using a static field with the pipe character
[object Object] Output
[object Object] Output
If you’re seeing Solutions:
"[object Object]" in your output:Cause: You’re using a trailing pipe with an object:- Remove the pipe to preserve the object:
- Access individual properties:
Unexpected Array Behavior
Unexpected Array Behavior
If your array is appearing as a comma-separated string:Cause: You’re using a trailing pipe with an array:Solutions:
- Remove pipe to preserve array:
{"items": "$.order.items"} - Keep pipe if you want comma-separated string
- Use JSONPath to select specific items:
$.order.items[0]
What’s Next?
Filters & Expressions
Learn to filter and query data with conditional expressions
Advanced Techniques
Discover power user features and optimizations
Examples
See real-world pipe operator patterns
Reference
Complete syntax reference
Questions? Check the Reference or visit our Help Center.