Array slice with range of 0
Setup
Selector: $[0:0]
[
"first",
"second"
]
Results
Consensus
[]
Not found consensus
This consensus applies for implementations which return a specific not found value if no match exists.
NOT_FOUND
Other responses
Bash (JSONPath.sh)
[
"first",
"second"
]
Clojure (json-path)
¹
"first"
Elixir (ExJsonPath)
[
"first",
"second"
]
[
"first"
]
JavaScript (jsonpath-plus)
[
"first",
"second"
]
PHP (Goessner)
²
[
"first",
"second"
]
Raku (JSON-Path)
[
"first"
]
Ruby (jsonpath)
[
"first"
]
Rust (jsonpath)
[
"first"
]
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.