You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell (sorry if I'm missing something), it appears to be impossible to select properties that contain a square bracket ([]) in their name.
Code sample or steps to reproduce
Given the following JSON object:
{
"abc": 2,
"cd[DataLayer]": 1
}
I want to select the cd[DataLayer] property. These are the expressions I have tried (unsuccessfully):
Describe the bug
As far as I can tell (sorry if I'm missing something), it appears to be impossible to select properties that contain a square bracket (
[]
) in their name.Code sample or steps to reproduce
Given the following JSON object:
I want to select the
cd[DataLayer]
property. These are the expressions I have tried (unsuccessfully):Console error or logs
No errors for any of the expressions listed above, but they all return an empty result (
[]
).Expected behavior
I would expect there to be some expression that can select the
cd[DataLayer]
property.As per the json-path-comparison project,
$[']']
should return[42]
for the input{"]": 42}
, which fails in jsonpath-plus: https://cburgmer.github.io/json-path-comparison/results/bracket_notation_with_quoted_closing_bracket_literal.html#JavaScript_jsonpath-plusExpected result
[ 1 ]
Environment (IMPORTANT)
Desktop
The text was updated successfully, but these errors were encountered: