Filter expression with set wise comparison to set
Setup
Selector: $.x[?(@[*]>=$.y[*])]
{"x":[[1,2],[3,4],[5,6]],"y":[3,4,5]}
Results
Other responses
Bash (JSONPath.sh)
[]
C (json-glib)
Not supported
Unable to compile selector `$.x[?(@[*]>=$.y[*])]': Invalid array index definition “?(@[*]>=$.y[*])]”
Clojure (json-path)
¹
[]
Cpp (jsoncons)
[]
Dart (json_path)
Not supported
FormatException: end of input expected at 1:4. Expression: $.x[?(@[*]>=$.y[*])]
Elixir (ExJsonPath)
Not supported
syntax error before: '*'
Elixir (jaxon)
[]
Elixir (warpath)
¹
Not supported
Parser error: Invalid token on line 1, syntax error before: <<"*">>
Not supported
invalid syntax (position=6, reason=JSONPath that returns a value group is prohibited, near=@[*]>=$.y[*])])
Not supported
parsing error: $.x[?(@[*]>=$.y[*])] - 1:13 unknown operator >=
[
[
3,
4
],
[
5,
6
]
]
[]
[
[
5,
6
]
]
Haskell (jsonpath)
Not supported
Invalid JSONPath: $.x[?(@[*]>=$.y[*])]
Error: 1:9:
|
1 | $.x[?(@[*]>=$.y[*])]
| ^
unexpected '*'
expecting '!', '"', ''', '+', '-', integer, or white space
JavaScript (brunerd)
Not supported
Java (com.github.jsurfer)
Not supported
line 1:11 token recognition error at: '=$'
org.antlr.v4.runtime.misc.ParseCancellationException
Java (com.jayway.jsonpath)
¹
³
[]
Kotlin (com.nfeld.jsonpathkt)
¹
Not supported
Unexpected char, char=?, index=4
Objective-C (SMJJSONPath)
¹
³
[]
PHP (galbar-jsonpath)
²
[
[
3,
4
],
[
5,
6
]
]
PHP (remorhaz-jsonpath)
[]
PHP (softcreatr-jsonpath)
[]
Python (jsonpath)
²
Not found
jsonpath returned false, this might indicate an error
Python (jsonpath-ng)
Not supported
JsonPathLexerError('Error on line 1, col 4: Unexpected character: ? ')
Python (jsonpath-rw)
Not supported
JsonPathLexerError('Error on line 1, col 4: Unexpected character: ? ')
Python (jsonpath2)
[]
Raku (JSON-Path)
Not supported
Evaluation of embedded Perl 6 code not allowed (construct with :allow-eval)
Ruby (jsonpath)
[
[
1,
2
],
[
3,
4
],
[
5,
6
]
]
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_plus)
[]
Scala (jsonpath)
[
[
3,
4
],
[
5,
6
]
]
Swift (Sextant)
[]
dotNET (Json.NET)
[
[
3,
4
],
[
5,
6
]
]
dotNET (JsonCons.JsonPath)
[]
dotNET (JsonPath.Net)
[
[
1,
2
],
[
3,
4
],
[
5,
6
]
]
dotNET (Manatee.Json)
Not supported
JSON Path expression indexers only support single constant values. Path up to error: '$.x'
JSON (Path_Reference_Implementation)
Not supported
--> 1:5
|
1 | $.x[?(@[*]>=$.y[*])]
| ^---
|
= expected unionChild, unionArrayIndex, or sliceStart
Proposal (A)
Not supported
x 1:9-1:9 Integer
| $.x[?(@[*]>=$.y[*])]
| ^
x 1:9-1:9 BracketChild
| $.x[?(@[*]>=$.y[*])]
| ^
x 1:8-1:8 ScalarOperator
| $.x[?(@[*]>=$.y[*])]
| ^
o 1:7-1:8 DocumentValue
| $.x[?(@[*]>=$.y[*])]
| ^
o 1:7-1:8 UnaryFilterExpression
| $.x[?(@[*]>=$.y[*])]
| ^
| x 1:9-1:9 Integer
| | $.x[?(@[*]>=$.y[*])]
| | ^
| x 1:9-1:9 BracketChild
| | $.x[?(@[*]>=$.y[*])]
| | ^
| x 1:8-1:8 ScalarOperator
| | $.x[?(@[*]>=$.y[*])]
| | ^
| o 1:7-1:8 DocumentValue
| | $.x[?(@[*]>=$.y[*])]
| | ^
| o 1:7-1:8 FilterValue
| | $.x[?(@[*]>=$.y[*])]
| | ^
| |
|/
o 1:7-1:8 HigherPrecedenceFilterExpression
| $.x[?(@[*]>=$.y[*])]
| ^
x 1:7-1:7 LogicalOr
| $.x[?(@[*]>=$.y[*])]
| ^
| x 1:9-1:9 Integer
| | $.x[?(@[*]>=$.y[*])]
| | ^
| x 1:9-1:9 BracketChild
| | $.x[?(@[*]>=$.y[*])]
| | ^
| x 1:8-1:8 ScalarOperator
| | $.x[?(@[*]>=$.y[*])]
| | ^
| o 1:7-1:8 DocumentValue
| | $.x[?(@[*]>=$.y[*])]
| | ^
| o 1:7-1:8 UnaryFilterExpression
| | $.x[?(@[*]>=$.y[*])]
| | ^
| | x 1:9-1:9 Integer
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | x 1:9-1:9 BracketChild
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | x 1:8-1:8 ScalarOperator
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | o 1:7-1:8 DocumentValue
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | o 1:7-1:8 FilterValue
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | |
| |/
| o 1:7-1:8 HigherPrecedenceFilterExpression
| | $.x[?(@[*]>=$.y[*])]
| | ^
| x 1:7-1:7 LogicalAnd
| | $.x[?(@[*]>=$.y[*])]
| | ^
| | x 1:9-1:9 Integer
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | x 1:9-1:9 BracketChild
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | x 1:8-1:8 ScalarOperator
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | o 1:7-1:8 DocumentValue
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | o 1:7-1:8 UnaryFilterExpression
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | | x 1:9-1:9 Integer
| | | | $.x[?(@[*]>=$.y[*])]
| | | | ^
| | | x 1:9-1:9 BracketChild
| | | | $.x[?(@[*]>=$.y[*])]
| | | | ^
| | | x 1:8-1:8 ScalarOperator
| | | | $.x[?(@[*]>=$.y[*])]
| | | | ^
| | | o 1:7-1:8 DocumentValue
| | | | $.x[?(@[*]>=$.y[*])]
| | | | ^
| | | o 1:7-1:8 FilterValue
| | | | $.x[?(@[*]>=$.y[*])]
| | | | ^
| | | |
| | |/
| | o 1:7-1:8 HigherPrecedenceFilterExpression
| | | $.x[?(@[*]>=$.y[*])]
| | | ^
| | |
|/ /
| |
|/
o 1:7-1:8 FilterExpression
| $.x[?(@[*]>=$.y[*])]
| ^
x 1:5-1:5 BracketElement
| $.x[?(@[*]>=$.y[*])]
| ^
x 1:5-1:5 BracketElements
| $.x[?(@[*]>=$.y[*])]
| ^
x 1:4-1:4 BracketChildren
| $.x[?(@[*]>=$.y[*])]
| ^
x 1:4-1:4 Operator
| $.x[?(@[*]>=$.y[*])]
| ^
o 1:1-1:4 Start
$.x[?(@[*]>=$.y[*])]
^^^
Errors
Erlang (ejsonpath)
Timeout
interface conversion: interface {} is nil, not string
wrong request: wrong request: ?(@[*]>=$.y[*])
JavaScript (Goessner)
²
jsonPath: Unexpected token *: _v[*]>=$.y[*]
JavaScript (jsonpath)
Line 1: Unexpected token *
JavaScript (jsonpath-plus)
Unexpected token '*'
PHP (Goessner)
²
ArgumentCountError
Perl (JSON-Path)
non-safe evaluation, died at main.pl line 11.
Rust (jsonpath_lib)
panic occurred
dotNET (JsonPathLib)
Line 1: Unexpected token *
Footnotes
- ¹ This implementation returns a single value where only one match is possible (instead of an array of a single value).
- ² This implementation returns a specific not found value if no match exists.
- ³ This implementation returns a specific not found value if a query that would regularly return a single match results in no match.