We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi
For the json path = $['tool']['books'][*]['properties'][*][? (@['name'] == 'moq') ]['value']
$['tool']['books'][*]['properties'][*][? (@['name'] == 'moq') ]['value']
the output based on the json below should be ["x","q"]
["x","q"]
but i get []
[]
I get the correct output when using
i tried alternative json path json_path='$.tool.books.[*].properties.[*].[?(@.name=="moq")]'
json_path='$.tool.books.[*].properties.[*].[?(@.name=="moq")]'
i get weird printed errors = [2022-11-02 15:43:23]-ERROR-[jsonpath] string indices must be integers
[2022-11-02 15:43:23]-ERROR-[jsonpath] string indices must be integers
sample json is as follows:
{ "tool": { "jsonpath": { "creator": { "name": "Jayway Inc.", "location": [ "Malmo", "San Francisco", "Helsingborg" ] } }, "books": [{ "title": "Beginning JSON", "price": 49.99, "properties": [{ "name": "moq", "value": "x" }, { "name": "url", "value": "1" }] }, { "price": 1.99, "properties": [{ "name": "url", "value": "3" }] }, { "title": "JSON at Work", "price": 29.99, "properties": [{ "name": "moq", "value": "q" }, { "name": "url", "value": "2" }] } ] } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi
For the json path =
$['tool']['books'][*]['properties'][*][? (@['name'] == 'moq') ]['value']
the output based on the json below should be
["x","q"]
but i get
[]
I get the correct output when using
i tried alternative json path
json_path='$.tool.books.[*].properties.[*].[?(@.name=="moq")]'
i get weird printed errors =
[2022-11-02 15:43:23]-ERROR-[jsonpath] string indices must be integers
sample json is as follows:
The text was updated successfully, but these errors were encountered: