Skip to main content

Reference Guide

Complete syntax reference, troubleshooting guide, and quick-lookup tables for JSON Path mapping.

Quick Syntax Reference

Core Operators

OperatorNameDescriptionExample
$RootDocument root$.NODE.data
.DotChild operator$.NODE.user.name
..RecursiveDeep scan$..price
*WildcardAll elements$.NODE.*
[]BracketsSubscript$.NODE['property-name']
[n]Array IndexSpecific position$.NODE.items[0]
[start:end]SliceArray range$.NODE.items[0:3]
[-n]Negative IndexFrom end$.NODE.items[-1]
[*]Array WildcardAll array items$.NODE.items[*]
[?()]FilterConditional selection$.NODE[?(@.price>10)]
^ParentParent reference$.NODE.child^
~Property NameGet key names$.NODE.*~
|PipeConcatenation (custom)First|$|Last

QuivaWorks-Specific Extensions

FeatureDescriptionExample
NODE_ID ReferenceReference any node by ID$.NODE_ID.property
Pipe OperatorConcatenate static + dynamicName: |$.NODE.name
Inline DetectionUse anywhere in object{"key": "$.NODE.value"}
Multi-pipeMultiple concatenations$.first| |$.last
The pipe operator (|) is a QuivaWorks custom extension not found in standard JSONPath implementations.

Array Operations

Array Access Methods

// Positive indexing (0-based)
"$.NODE.items[0]"      // First item
"$.NODE.items[1]"      // Second item
"$.NODE.items[5]"      // Sixth item

// Negative indexing (from end)
"$.NODE.items[-1]"     // Last item
"$.NODE.items[-2]"     // Second-to-last
"$.NODE.items[-5]"     // Fifth from end

Filter Expressions

Filter Syntax Patterns

// Existence check
"$.items[?(@.id)]"                    // Has 'id' property
"$.items[?(@.active)]"                // Has truthy 'active'

// Equality
"$.items[?(@.status==='active')]"    // Strict equality
"$.items[?(@.type=='premium')]"      // Loose equality
"$.items[?(@.count===0)]"            // Zero check

// Inequality
"$.items[?(@.status!=='deleted')]"   // Not equal
"$.items[?(@.role!='guest')]"        // Loose not equal
// Greater than / Less than
"$.items[?(@.price>100)]"            // Price over 100
"$.items[?(@.stock<10)]"             // Low stock
"$.items[?(@.rating>=4.5)]"          // High rated
"$.items[?(@.age<=18)]"              // Max age

// Numeric ranges
"$.items[?(@.price>=10 && @.price<=100)]"     // Between 10-100
"$.items[?(@.quantity>0 && @.quantity<50)]"   // Range 1-49
// AND operator (&&)
"$.items[?(@.active===true && @.verified===true)]"
"$.users[?(@.age>=18 && @.country==='US')]"
"$.products[?(@.inStock && @.price<100)]"

// OR operator (||)
"$.items[?(@.status==='pending' || @.status==='processing')]"
"$.users[?(@.role==='admin' || @.role==='moderator')]"
"$.items[?(@.priority==='high' || @.urgent===true)]"

// Complex combinations
"$.items[?(@.active && (@.type==='A' || @.type==='B'))]"
"$.users[?(@.verified && @.age>=18 && (@.role==='admin' || @.role==='moderator'))]"
// Exact match
"$.items[?(@.category==='electronics')]"
"$.users[?(@.email==='[email protected]')]"

// Case sensitivity
"$.items[?(@.name==='Product')]"     // Case-sensitive
"$.items[?(@.name=='product')]"      // Still case-sensitive

// Note: Regular expressions not supported in standard JSONPath
// Use exact string matching only
// Check for null
"$.items[?(@.deletedAt===null)]"     // Is null
"$.items[?(@.value!==null)]"         // Not null

// Check existence (undefined)
"$.items[?(@.optional)]"             // Property exists and truthy
"$.items[?([email protected])]"            // Property missing or falsy

// Type selectors (advanced)
"$.items[?(@null())]"                // Null values only
"$.items[?(@undefined())]"           // Undefined only

Filter Expression Variables

Special Variables Reference

VariableScopeDescriptionExample
@CurrentThe current node being filtered?(@.price>10)
@.propertyCurrentProperty of current node?(@.status==='active')
@.nested.propCurrentNested property access?(@.user.age>=18)
@rootGlobalRoot of entire JSON document?(@[email protected])
@parentParentParent object of current node?(@parent.type==='premium')
@propertyMetaProperty name or array index?(@property!==0)
@parentPropertyMetaParent’s property name?(@parentProperty!=='hidden')
@pathMetaJSONPath to current node?(@path!==\"$['items'][0]\")

Special Functions

// Min/Max
"$.items[?(@.price===@min(@..price))]"    // Cheapest item
"$.items[?(@.score===@max(@..score))]"    // Highest score

// Note: @min() and @max() work on descendant values
"$.products[?(@.price===@min(@root.products[*].price))]"

Comparison Operators

Complete Operator Table

OperatorDescriptionWorks WithExample
===Strict equalityAll types?(@.status==='active')
!==Strict inequalityAll types?(@.type!=='hidden')
==Loose equalityAll types?(@.count==5)
!=Loose inequalityAll types?(@.value!=null)
<Less thanNumbers, strings?(@.age<18)
>Greater thanNumbers, strings?(@.price>100)
<=Less than or equalNumbers, strings?(@.score<=50)
>=Greater than or equalNumbers, strings?(@.quantity>=10)
&&Logical ANDBoolean expressions?(@.a && @.b)
||Logical ORBoolean expressions?(@.a || @.b)
!Logical NOTBoolean expressions?([email protected])
Important Differences:
  • Use === (triple equals) not = (single equals)
  • Use !== not ! for inequality
  • Strings in comparisons must be quoted: 'value' or "value"

Operator Precedence

From highest to lowest priority:
  1. Grouping: ()
  2. Property Access: ., []
  3. Logical NOT: !
  4. Comparison: <, >, <=, >=
  5. Equality: ===, !==, ==, !=
  6. Logical AND: &&
  7. Logical OR: ||
// This evaluates as: (@.active && @.verified) || @.admin
"$.users[?(@.active && @.verified || @.admin)]"

// Result: Active+Verified users OR any admin (even inactive)

Common Patterns Quick Reference

Pattern Library

Basic Property Access

"$.NODE.property"
"$.NODE.nested.deep.value"
"$.NODE['property-name']"
"$.NODE['property with spaces']"

Array Operations

"$.NODE.array[0]"
"$.NODE.array[-1]"
"$.NODE.array[*]"
"$.NODE.array[0:3]"
"$.NODE.array.length"

Concatenation

"Text|$.NODE.value"
"$.NODE.first| |$.NODE.last"
"$.NODE.city|, |$.NODE.state"
"Prefix:|$.NODE.data|:Suffix"

Filtering

"$.NODE[?(@.active)]"
"$.NODE[?(@.price>100)]"
"$.NODE[?(@.status==='done')]"
"$.NODE[?(@.type==='A' || @.type==='B')]"

Deep Scanning

"$..property"
"$..price"
"$..id"
"$.NODE..status"

Wildcards

"$.NODE.*"
"$.NODE.users[*].name"
"$.NODE.items[*].price"
"$.NODE.*~"

Complex Filters

"$.NODE[?(@.a && @.b)]"
"$.NODE[?(@.x>10 && @.y<20)]"
"$.NODE[?(@.status!=='deleted')]"
"$.NODE[?(@.price>=@min(@..price))]"

Combining Patterns

"$.NODE.items[?(@.active)][0]"
"$.NODE.users[*].orders[?(@.paid)]"
"$.NODE[?(@.type==='A')].value|text"
"First: |$.NODE[0].name"

Troubleshooting Guide

Common Errors & Solutions

Symptoms: Path returns undefined, filter returns empty array [], or property seems to exist but isn’t found.Common Causes:Incorrect Node ID
// ❌ Wrong
"$.wrong_node_id.property"

// ✅ Correct
"$.correct_node_id.property"
Case Sensitivity
// ❌ Wrong case
"$.NODE.Username"

// ✅ Correct case
"$.NODE.username"
Array Index Out of Bounds
// ❌ Array only has 3 items
"$.NODE.items[5]"

// ✅ Check length first
"$.NODE.items[2]"
Property Doesn’t Exist
// ❌ Typo in property name
"$.NODE.custmor_name"

// ✅ Correct spelling
"$.NODE.customer_name"
Solutions: Verify node ID matches exactly in flow, check property names in Flow Debugger, test with simpler paths and build up, and use .length to check array sizes.
Symptoms: Filter returns wrong items, filter returns nothing, or comparison seems correct but fails.Common Causes:Using = Instead of ===
// ❌ Single equals doesn't work
"$.items[?(@.status='active')]"

// ✅ Use triple equals
"$.items[?(@.status==='active')]"
Missing Quotes on Strings
// ❌ String without quotes
"$.items[?(@.type===premium)]"

// ✅ Quoted string
"$.items[?(@.type==='premium')]"
Wrong Comparison Type
// ❌ Comparing string to number
"$.items[?(@.id===123)]"
// If id is string "123"

// ✅ Match types
"$.items[?(@.id==='123')]"
Forgetting @ in Filter
// ❌ Missing @ symbol
"$.items[?(price>10)]"

// ✅ Include @ for current node
"$.items[?(@.price>10)]"
Solutions: Always use === for equality (not =), quote string values in comparisons, use @ to reference current node, and check data types match in comparisons.
Symptoms: Comparison fails unexpectedly, filter returns empty when data exists, or inconsistent results.Common Causes:String vs Number
// ❌ Comparing string "10" to number 10
"$.items[?(@.quantity===10)]"
// When quantity is string "10"

// ✅ Match the type in source data
"$.items[?(@.quantity==='10')]"
Boolean as String
// ❌ Boolean comparison fails
"$.items[?(@.active===true)]"
// When active is string "true"

// ✅ String comparison
"$.items[?(@.active==='true')]"
Null vs Undefined
// ❌ These are different
"$.items[?(@.value===null)]"      // Explicitly null
"$.items[?([email protected])]"             // Undefined or falsy

// ✅ Be specific
"$.items[?(@.value===null)]"       // Only null
"$.items[?(@value)]"               // Exists check
Solutions: Check source data types in debugger, use loose equality == if types vary, and convert types in earlier flow nodes if needed.
Symptoms: Pipe concatenation not working, literal | appears in output, or parts missing from concatenated string.Common Causes:Spaces Around Pipe
// ❌ Spaces might cause issues
"$.NODE.first | $.NODE.last"

// ✅ No spaces around pipe
"$.NODE.first|$.NODE.last"
Empty/Undefined Values
// ❌ If middle_name doesn't exist
"$.first| |$.middle| |$.last"
// Result: "John  Smith" (double space)

// ✅ Ensure all values exist or handle in flow
Wrong Pipe Type
// ❌ Using filter pipe instead of concat
"$.items | $.NODE.name"

// ✅ Custom concat pipe
"Text|$.NODE.name"
Solutions: Remove spaces around pipes, check all referenced values exist, and remember that | is a QuivaWorks custom extension (not standard JSONPath).
Symptoms: Slow flow execution, timeouts on large datasets, or high memory usage.Common Causes:Deep Scan on Large Data
// ❌ Scans entire tree
"$..price"

// ✅ Specific path
"$.NODE.products[*].price"
Multiple Filters
// ❌ Separate filters compound
"$.items[?(@.active)][?(@.verified)][?(@.premium)]"

// ✅ Combined filter
"$.items[?(@.active && @.verified && @.premium)]"
Unnecessary Wildcards
// ❌ Gets all properties
"$.NODE.*"

// ✅ Get only what you need
"$.NODE.specificProperty"
Solutions: Use specific paths instead of deep scan, combine filter conditions, limit array slicing ranges, and process data in smaller batches if possible.
Symptoms: Properties with special characters not accessible, syntax errors with property names, or unexpected undefined results.Common Causes:Spaces in Property Names
// ❌ Dot notation fails
"$.NODE.user name"

// ✅ Bracket notation
"$.NODE['user name']"
Hyphens/Dashes
// ❌ Interpreted as subtraction
"$.NODE.user-id"

// ✅ Bracket notation
"$.NODE['user-id']"
Special Characters
// ❌ Dot notation fails
"$.NODE.user@email"
"$.NODE.price$amount"

// ✅ Bracket notation
"$.NODE['user@email']"
"$.NODE['price$amount']"
Numeric-Starting Names
// ❌ Confusing syntax
"$.NODE.2fa_enabled"

// ✅ Bracket notation
"$.NODE['2fa_enabled']"
Solutions: Use bracket notation ['property'] for special characters, spaces, hyphens, @, $, etc., and for properties that start with numbers.

Error Messages Reference

Common Error Messages

Error MessageCauseSolution
JSONPath syntax errorInvalid JSONPath expressionCheck syntax, ensure proper quotes and brackets
Unexpected tokenMalformed JSON or pathVerify JSON structure and path syntax
Cannot read property of undefinedAccessing non-existent propertyCheck if property exists before accessing
Invalid array indexArray index out of boundsVerify array length, use .length
Filter expression errorInvalid filter syntaxCheck filter uses @, ===, proper operators
Type error in comparisonComparing incompatible typesEnsure types match or use loose equality ==
Circular referenceParent/root creates infinite loopAvoid self-referential filters
Maximum call stack exceededInfinite recursion in pathReview recursive descent usage ..

Best Practices

Do’s and Don’ts

Do These Things:✅ Use specific paths when possible: $.NODE.user.name✅ Use triple equals in filters: ?(@.status==='active')✅ Quote strings in filters: ?(@.type==='premium')✅ Check array length before accessing: $.items.length✅ Use bracket notation for special characters: ['user-id']✅ Combine filters with && and ||: ?(@.a && @.b)✅ Use meaningful node IDs in flows for clarity✅ Test paths with Flow Debugger before deploying✅ Use array slicing for pagination: [0:10]✅ Validate data structures in earlier nodes when possible

Testing Strategies

How to Test Your Paths

1

Start Simple

Begin with basic property access and verify it works:
"$.NODE.property"
2

Add Complexity Gradually

Add one feature at a time (arrays, then filters):
"$.NODE.items[0]"
"$.NODE.items[?(@.active)]"
3

Use Flow Debugger

Test each path in the Flow Debugger to see actual results before deploying.
4

Test Edge Cases

Test with empty arrays [], missing properties undefined, null values null, and different data types.
5

Verify Output Format

Check if you need an array [...] or single value, and adjust accordingly:
"$.NODE.items[?(@.active)][0]"  // Single item
"$.NODE.items[?(@.active)]"     // Array of items

Migration from Other Systems

From Zapier

// Zapier uses {{double.braces}}
{{1.customer.name}}
{{2.order.items.0.price}}

From Make (Integromat)

// Make uses {{module.field}}
{{1.name}}
{{2.items[].name}}

From n8n

// n8n uses {{$node["Node Name"].json.field}}
{{$node["HTTP Request"].json.data.name}}
Key Difference: QuivaWorks uses standard JSONPath syntax with custom extensions, making it more powerful for complex data transformations.

Keyboard Shortcuts & Tips

Flow Builder Shortcuts

ShortcutAction
Test PathClick “Test” button in mapping field
View Source DataOpen Flow Debugger panel
Copy PathRight-click property in debugger
Format JSONAuto-formats in code view
Validate SyntaxAutomatic on field blur

Debugging Tips

Start Small

Test basic path first, then add complexity one step at a time.

Use Console

Test JSONPath expressions in browser console with sample data.

Check Types

Use typeof or Flow Debugger to verify data types before filtering.

Log Intermediate Results

Create intermediate nodes to see transformation steps.

Next Steps


Quick Reference Card

Bookmark this page! This reference guide contains everything you need for JSONPath mapping in QuivaWorks flows.