Union with wildcard and number
Setup
Selector: $[*,1]
["first", "second", "third", "forth", "fifth"]
Results
Consensus
Not supported
Other responses
Bash (JSONPath.sh)
[]
Clojure (json-path)
¹
[
"first",
"second",
"third",
"forth",
"fifth"
]
Cpp (jsoncons)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
Dart (json_path)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
Elixir (jaxon)
[]
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
[
"second"
]
[
"second"
]
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
JavaScript (Goessner)
²
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
JavaScript (brunerd)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
JavaScript (jsonpath-plus)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
PHP (Goessner)
²
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
Perl (JSON-Path)
[
"second"
]
Python (jsonpath)
²
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
Python (jsonpath2)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
Ruby (jsonpath)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
dotNET (JsonCons.JsonPath)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
dotNET (JsonPath.Net)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
dotNET (JsonPathLib)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
Proposal (A)
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
Errors
strconv.Atoi: parsing "*": invalid syntax
Rust (jsonpath_plus)
Error Parsing JSON Path:
$[*,1]
panic occurred
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.