Bracket notation without quotes
Setup
Selector: $[key]
{
"key": "value"
}
Results
Consensus
Not supported
Other responses
Bash (JSONPath.sh)
[
"value"
]
Elixir (jaxon)
[
"value"
]
"value"
[
"value"
]
JavaScript (Goessner)
²
[
"value"
]
JavaScript (jsonpath-plus)
[
"value"
]
JavaScript (jsonpathly)
[
"value"
]
PHP (Goessner)
²
[
"value"
]
PHP (galbar-jsonpath)
[
"value"
]
PHP (remorhaz-jsonpath)
[
"value"
]
PHP (softcreatr-jsonpath)
[
"value"
]
Perl (JSON-Path)
[
"value"
]
Python (jsonpath)
²
[
"value"
]
Python (jsonpath-ng)
[
"value"
]
Python (jsonpath-rw)
[
"value"
]
Python (python-jsonpath)
[
"value"
]
dotNET (JsonPathLib)
[
"value"
]
Errors
Clojure (json-path)
¹
java.lang.Exception object must be an array.
unknown key value
strconv.Atoi: parsing "key": invalid syntax
Ruby (jsonpath)
invalid value for Integer(): "key"
Rust (jsonpath_plus)
Error Parsing JSON Path:
$[key]
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.