JSONPath Comparison

See how JSONPath is implemented across different languages. See the FAQ for why we are doing this and where the results come from.

Explanation

Bash C Clojure Cpp Dart Elixir Erlang Golang Haskell JavaScript Java Kotlin Objective-C PHP Perl Python Raku Ruby Rust Scala Swift dotNET
# Array slice $[1:3]
# Array slice on exact match $[0:5] e
# Array slice on non overlapping array $[7:10] e e
# Array slice on object $[1:3] e e e e e
# Array slice on partially overlapping array $[1:10] e
# Array slice with large number for end $[2:113667776004] e e e e e e e e
# Array slice with large number for end and negative step $[2:-113667776004:-1] e e e e e e
# Array slice with large number for start $[-113667776004:2] e e e e e e e e
# Array slice with large number for start end negative step $[113667776004:2:-1] e e e e e e e e
# Array slice with negative start and end and range of -1 $[-4:-5]
# Array slice with negative start and end and range of 0 $[-4:-4]
# Array slice with negative start and end and range of 1 $[-4:-3]
# Array slice with negative start and positive end and range of -1 $[-4:1]
# Array slice with negative start and positive end and range of 0 $[-4:2]
# Array slice with negative start and positive end and range of 1 $[-4:3]
# Array slice with negative step $[3:0:-2] e e e e
# Array slice with negative step on partially overlapping array $[7:3:-1] e e e e e e
# Array slice with negative step and start greater than end $[0:3:-2] e e e e e e
# Array slice with negative step only $[::-2] e e e e e
# Array slice with open end $[1:]
# Array slice with open end and negative step $[3::-1] e e e e e
# Array slice with open start $[:2]
# Array slice with open start and end $[:] e e
# Array slice with open start and end on object $[:] e e e e e e
# Array slice with open start and end and step empty $[::] e e
# Array slice with open start and negative step $[:2:-1] e e e e e e
# Array slice with positive start and negative end and range of -1 $[3:-4]
# Array slice with positive start and negative end and range of 0 $[3:-3]
# Array slice with positive start and negative end and range of 1 $[3:-2]
# Array slice with range of -1 $[2:1]
# Array slice with range of 0 $[0:0]
# Array slice with range of 1 $[0:1]
# Array slice with start -1 and open end $[-1:]
# Array slice with start -2 and open end $[-2:]
# Array slice with start large negative number and open end on short array $[-4:] e e
# Array slice with step $[0:3:2] e e
# Array slice with step 0 $[0:3:0] e e e e e e e e e e e e e e e
# Array slice with step 1 $[0:3:1] e e
# Array slice with step and leading zeros $[010:024:010] e e
# Array slice with step but end not aligned $[0:4:2] e e
# Array slice with step empty $[1:3:] e
# Array slice with step only $[::2] e
# Bracket notation $['key'] e e
# Bracket notation on object without key $['missing'] e e
# Bracket notation after recursive descent $..[0] e e e e e
# Bracket notation with NFC path on NFD key $['ü'] e e e
# Bracket notation with dot $['two.some'] e e
# Bracket notation with double quotes $["key"] e e
# Bracket notation with empty path $[] e e e e e
# Bracket notation with empty string $[''] e e
# Bracket notation with empty string doubled quoted $[""] e e
# Bracket notation with negative number on short array $[-2] e e e e e e
# Bracket notation with number $[2]
# Bracket notation with number on object $[0] e e e e
# Bracket notation with number on short array $[1] e e e
# Bracket notation with number on string $[0] e e e e e e e e e e e
# Bracket notation with number after dot notation with wildcard on nested arrays with different length $.*[1] e e
# Bracket notation with number -1 $[-1] e e
# Bracket notation with number -1 on empty array $[-1] e e e e e
# Bracket notation with number 0 $[0]
# Bracket notation with quoted array slice literal $[':'] e e e
# Bracket notation with quoted closing bracket literal $[']'] e e e
# Bracket notation with quoted current object literal $['@'] e e e e
# Bracket notation with quoted dot literal $['.'] e e e
# Bracket notation with quoted dot wildcard $['.*'] e e
# Bracket notation with quoted double quote literal $['"'] e e e
# Bracket notation with quoted escaped backslash $['\\'] e e
# Bracket notation with quoted escaped single quote $['\''] e e e e
# Bracket notation with quoted number on object $['0'] e e
# Bracket notation with quoted root literal $['$'] e e e
# Bracket notation with quoted special characters combined $[':@."$,*\'\\'] e e e e e
# Bracket notation with quoted string and unescaped single quote $['single'quote'] e e e e e
# Bracket notation with quoted union literal $[','] e e e
# Bracket notation with quoted wildcard literal $['*'] e e
# Bracket notation with quoted wildcard literal on object without key $['*'] e e
# Bracket notation with spaces $[ 'a' ] e e e
# Bracket notation with string including dot wildcard $['ni.*'] e e
# Bracket notation with two literals separated by dot $['two'.'some'] e e e e
# Bracket notation with two literals separated by dot without quotes $[two.some] e e e e e e
# Bracket notation with wildcard on array $[*]
# Bracket notation with wildcard on empty array $[*] e
# Bracket notation with wildcard on empty object $[*] e e
# Bracket notation with wildcard on null value array $[*]
# Bracket notation with wildcard on object $[*] e
# Bracket notation with wildcard after array slice $[0:2][*]
# Bracket notation with wildcard after dot notation after bracket notation with wildcard $[*].bar[*]
# Bracket notation with wildcard after recursive descent $..[*] e e
# Bracket notation without quotes $[key] e e e e e
# Current with dot notation @.a e e e e
# Dot bracket notation $.['key'] e e e
# Dot bracket notation with double quotes $.["key"] e e e
# Dot bracket notation without quotes $.[key] e e e e
# Dot notation $.key
# Dot notation on array $.key e
# Dot notation on array value $.key
# Dot notation on array with containing object matching key $.id e
# Dot notation on empty object value $.key
# Dot notation on null value $.key
# Dot notation on object without key $.missing e e
# Dot notation after array slice $[0:2].key
# Dot notation after bracket notation after recursive descent $..[1].key e e e e e
# Dot notation after bracket notation with wildcard $[*].a
# Dot notation after bracket notation with wildcard on one matching $[*].a
# Dot notation after bracket notation with wildcard on some matching $[*].a
# Dot notation after filter expression $[?(@.id==42)].name e e
# Dot notation after recursive descent $..key e
# Dot notation after recursive descent after dot notation $.store..price e
# Dot notation after recursive descent with extra dot $...key e
# Dot notation after union $[0,2].key
# Dot notation after union with keys $['one','three'].key e e e
# Dot notation with dash $.key-dash
# Dot notation with double quotes $."key" e e
# Dot notation with double quotes after recursive descent $.."key" e e e
# Dot notation with empty path $. e e
# Dot notation with key named in $.in
# Dot notation with key named length $.length
# Dot notation with key named length on array $.length e
# Dot notation with key named null $.null
# Dot notation with key named true $.true
# Dot notation with key root literal $.$ e e e
# Dot notation with non ASCII key $.屬性 e
# Dot notation with number $.2
# Dot notation with number on object $.2
# Dot notation with number -1 $.-1
# Dot notation with single quotes $.'key' e e
# Dot notation with single quotes after recursive descent $..'key' e e e
# Dot notation with single quotes and dot $.'some.key' e e e e
# Dot notation with space padded key $. a e
# Dot notation with wildcard on array $.* e
# Dot notation with wildcard on empty array $.* e
# Dot notation with wildcard on empty object $.* e
# Dot notation with wildcard on object $.* e
# Dot notation with wildcard after dot notation after dot notation with wildcard $.*.bar.* e
# Dot notation with wildcard after dot notation with wildcard on nested arrays $.*.* e
# Dot notation with wildcard after recursive descent $..* e
# Dot notation with wildcard after recursive descent on null value array $..* e
# Dot notation with wildcard after recursive descent on scalar $..* e e e
# Dot notation without dot $a e e
# Dot notation without root .key e e e
# Dot notation without root and dot key e e e
# Empty n/a e e e e e e e e e e e
# Filter expression on object $[?(@.key)] e e e
# Filter expression after dot notation with wildcard after recursive descent $..*[?(@.id>2)] e e e e e
# Filter expression after recursive descent $..[?(@.id==2)] e e e e
# Filter expression with addition $[?(@.key+50==100)] e e e e e
# Filter expression with boolean and operator $[?(@.key>42 && @.key<44)] e e e
# Filter expression with boolean and operator and value false $[?(@.key>0 && false)] e e e e e
# Filter expression with boolean and operator and value true $[?(@.key>0 && true)] e e e e e
# Filter expression with boolean or operator $[?(@.key>43 || @.key<43)] e e e
# Filter expression with boolean or operator and value false $[?(@.key>0 || false)] e e e e e e
# Filter expression with boolean or operator and value true $[?(@.key>0 || true)] e e e e e e
# Filter expression with bracket notation $[?(@['key']==42)] e e e e
# Filter expression with bracket notation and current object literal $[?(@['@key']==42)] e e e e
# Filter expression with bracket notation with -1 $[?(@[-1]==2)] e e e e
# Filter expression with bracket notation with number $[?(@[1]=='b')] e e e
# Filter expression with bracket notation with number on object $[?(@[1]=='b')] e e e e
# Filter expression with current object $[?(@)] e e e e e
# Filter expression with different grouped operators $[?(@.a && (@.b || @.c))] e e e e e
# Filter expression with different ungrouped operators $[?(@.a && @.b || @.c)] e e e e e
# Filter expression with division $[?(@.key/10==5)] e e e e
# Filter expression with dot notation with dash $[?(@.key-dash == 'value')] e e e e e e
# Filter expression with dot notation with number $[?(@.2 == 'second')] e e e e e e
# Filter expression with dot notation with number on array $[?(@.2 == 'third')] e e e e e e e
# Filter expression with empty expression $[?()] e e e e e
# Filter expression with equals $[?(@.key==42)] e e e e
# Filter expression with equals on array of numbers $[?(@==42)] e e e e
# Filter expression with equals on array without match $[?(@.key==43)] e e
# Filter expression with equals on object $[?(@.key==42)] e e e
# Filter expression with equals on object with key matching query $[?(@.id==2)] e e e
# Filter expression with equals array $[?(@.d==["v1","v2"])] e e e e e e e e
# Filter expression with equals array for array slice with range 1 $[?(@[0:1]==[1])] e e e e e e e e e e e
# Filter expression with equals array for dot notation with star $[?(@.*==[1,2])] e e e e e e e e e e e e
# Filter expression with equals array or equals true $[?(@.d==["v1","v2"] || (@.d == true))] e e e e e e e e e e
# Filter expression with equals array with single quotes $[?(@.d==['v1','v2'])] e e e e e e e e
# Filter expression with equals boolean expression value $[?((@.key<44)==false)] e e e e
# Filter expression with equals false $[?(@.key==false)] e e e
# Filter expression with equals null $[?(@.key==null)] e e
# Filter expression with equals number for array slice with range 1 $[?(@[0:1]==1)] e e e e e e e e e e e
# Filter expression with equals number for bracket notation with star $[?(@[*]==2)] e e e e e e e e
# Filter expression with equals number for dot notation with star $[?(@.*==2)] e e e e e e e e
# Filter expression with equals number with fraction $[?(@.key==-0.123e2)] e e e e
# Filter expression with equals number with leading zeros $[?(@.key==010)] e e e
# Filter expression with equals object $[?(@.d=={"k":"v"})] e e e e e e
# Filter expression with equals string $[?(@.key=="value")] e e e
# Filter expression with equals string in NFC $[?(@.key=="Motörhead")] e e
# Filter expression with equals string with current object literal $[?(@.key=="hi@example.com")] e e
# Filter expression with equals string with dot literal $[?(@.key=="some.value")] e e
# Filter expression with equals string with single quotes $[?(@.key=='value')] e e
# Filter expression with equals string with unicode character escape $[?(@.key=="Mot\u00f6rhead")] e e
# Filter expression with equals true $[?(@.key==true)] e e e
# Filter expression with equals with path and path $[?(@.key1==@.key2)] e e e e
# Filter expression with equals with root reference $.items[?(@.key==$.value)] e e e e
# Filter expression with greater than $[?(@.key>42)] e e e e e
# Filter expression with greater than or equal $[?(@.key>=42)] e e e e e e
# Filter expression with greater than string $[?(@.key>"VALUE")] e e e e
# Filter expression with in array of values $[?(@.d in [2, 3])] e e e e e e e
# Filter expression with in current object $[?(2 in @.d)] e e e e e e
# Filter expression with length free function $[?(length(@) == 4)] e e e e e e e e
# Filter expression with length function $[?(@.length() == 4)] e e e e e e e e
# Filter expression with length property $[?(@.length == 4)] e e
# Filter expression with less than $[?(@.key<42)] e e e e e
# Filter expression with less than or equal $[?(@.key<=42)] e e e e e e
# Filter expression with local dot key and null in data $[?(@.key='value')] e e e e e e e e e
# Filter expression with multiplication $[?(@.key*2==100)] e e e
# Filter expression with negation and equals $[?(!(@.key==42))] e e e e e e
# Filter expression with negation and equals array or equals true $[?(!(@.d==["v1","v2"]) || (@.d == true))] e e e e e e e e e e
# Filter expression with negation and less than $[?(!(@.key<42))] e e e e e e
# Filter expression with negation and without value $[?(!@.key)] e e e e e e
# Filter expression with non singular existence test $[?(@.a.*)] e e e e e e e
# Filter expression with not equals $[?(@.key!=42)] e e e e
# Filter expression with not equals array or equals true $[?((@.d!=["v1","v2"]) || (@.d == true))] e e e e e e e e e
# Filter expression with parent axis operator $[*].bookmarks[?(@.page == 45)]^^^ e e e
# Filter expression with regular expression $[?(@.name=~/hello.*/)] e e e e e
# Filter expression with regular expression from member $[?(@.name=~/@.pattern/)] e e e e e
# Filter expression with set wise comparison to scalar $[?(@[*]>=4)] e e e e e e e e e
# Filter expression with set wise comparison to set $.x[?(@[*]>=$.y[*])] e e e e e e e e e e
# Filter expression with single equal $[?(@.key=42)] e e e e e e e
# Filter expression with subfilter $[?(@.a[?(@.price>10)])] e e e e e
# Filter expression with subpaths $[?(@.a.b==3)] e e
# Filter expression with subpaths deeply nested $[?(@.a.b.c==3)] e e e e e
# Filter expression with subtraction $[?(@.key-50==-100)] e e e e
# Filter expression with tautological comparison $[?(1==1)] e e e
# Filter expression with triple equal $[?(@.key===42)] e e e e e e e
# Filter expression with value $[?(@.key)] e e e
# Filter expression with value after dot notation with wildcard on array of objects $.*[?(@.key)] e e
# Filter expression with value after recursive descent $..[?(@.id)] e e e e
# Filter expression with value false $[?(false)] e e e
# Filter expression with value from recursive descent $[?(@..child)] e e e e e e
# Filter expression with value null $[?(null)] e e e e e
# Filter expression with value true $[?(true)] e e e
# Filter expression without parens $[?@.key==42] e e e e e
# Filter expression without value $[?(@.key)] e e e
# Function sum $.data.sum() e e e
# Parens notation $(key,more) e e e e e
# Recursive descent $.. e e e
# Recursive descent on nested arrays $..* e
# Recursive descent after dot notation $.key.. e e e
# Root $
# Root on scalar $ e
# Root on scalar false $ e e e e
# Root on scalar true $ e
# Script expression $[(@.length-1)] e e e e e e e
# Union $[0,1]
# Union with duplication from array $[0,0]
# Union with duplication from object $['a','a'] e e
# Union with filter $[?(@.key<3),?(@.key>6)] e e e e e e e e
# Union with keys $['key','another'] e e
# Union with keys on object without key $['missing','key'] e e
# Union with keys after array slice $[:]['c','d'] e e e
# Union with keys after bracket notation $[0]['c','d'] e e
# Union with keys after dot notation with wildcard $.*['c','d'] e e
# Union with keys after recursive descent $..['c','d'] e e
# Union with numbers in decreasing order $[4,1]
# Union with repeated matches after dot notation with wildcard $.*[0,:5] e e e e
# Union with slice and number $[1:3,4] e e e
# Union with spaces $[ 0 , 1 ]
# Union with wildcard and number $[*,1] e e