Open Hugo2128 opened 2 years ago
Using a string with square brackets inside as Path returns undefind even if the Path is there.
Example:
{ "firstName": "John", "lastName": "doe", "age": 26, "address": { "streetAddress": "naist street", "city": "Nara", "postalCode": "630-0192" }, "phoneNumbers [1]": [ { "type": "iPhone", "number": "0123-4567-8888" }, { "type": "home", "number": "0123-4567-8910" } ] }
Now i want to get "phoneNumbers [1]" with
path: $..['phoneNumbers [1]'] or path: $..'phoneNumbers [1]' or path: $..phoneNumbers [1]
returns No Match
No Match
[ [ { "type": "iPhone", "number": "0123-4567-8888" }, { "type": "home", "number": "0123-4567-8910" } ] ]
When removing the square brackets everything works fine even when replacing them curly braces or parentheses
Can confirm it, have exactly the same issue
Describe the bug
Using a string with square brackets inside as Path returns undefind even if the Path is there.
Code sample or steps to reproduce
Example:
Now i want to get "phoneNumbers [1]" with
returns
No Match
Expected result
Environment (IMPORTANT)
Desktop**
Additional context
When removing the square brackets everything works fine even when replacing them curly braces or parentheses