Dot notation after bracket notation after recursive descent
Setup
Selector: $..[1].key
{
"k": [{"key": "some value"}, {"key": 42}],
"kk": [[{"key": 100}, {"key": 200}, {"key": 300}], [{"key": 400}, {"key": 500}, {"key": 600}]],
"key": [0, 1]
}
Results
Consensus
[
200,
42,
500
]
Other responses
C (json-glib)
Not supported
Unable to compile selector `$..[1].key': Missing member name or wildcard after . character
Elixir (ExJsonPath)
Not supported
syntax error before: '['
Elixir (jaxon)
[]
Erlang (ejsonpath)
Not supported
syntax error before: '['
[
42
]
Objective-C (SMJJSONPath)
¹
³
[
"some value",
100,
200,
300,
400,
42,
500,
600
]
Perl (JSON-Path)
[]
Rust (jsonpath)
Not supported
parsing error
Scala (jsonpath)
Not supported
JPError(end of input expected)
dotNET (Json.NET)
[]
Errors
Clojure (json-path)
¹
java.lang.Exception object must be an array.
expression don't support in filter
Python (jsonpath-ng)
KeyError(1)
Python (jsonpath-rw)
KeyError(1)
Ruby (jsonpath)
1 is not a symbol nor a string
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.