Union with numbers in decreasing order
Setup
Selector: $[4,1]
[1,2,3,4,5]
Results
Consensus
[
5,
2
]
Other responses
Bash (JSONPath.sh)
[
2,
5
]
Clojure (json-path)
¹
5
Elixir (jaxon)
[]
[
2,
5
]
Java (com.github.jsurfer)
[
2,
5
]
Python (jsonpath-ng)
Not supported
JsonPathParserError('Parse error at 1:3 near token , (,)')
Python (jsonpath-rw)
Not supported
Exception('Parse error at 1:3 near token , (,)')
Rust (jsonpath)
Not supported
parsing error
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.