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
Given a JSON such as:
[ { "type": ["a", "b"] }, { "type": ["c"] } ]
I can't figure out how to get all nodes where type=='c'? Is there a 'contains value' operator or something like that?
Thanks.
The text was updated successfully, but these errors were encountered:
There is no such "contains value" operator, but you could get there with a filter expression:
var nodes = jp.nodes(data, '$..[?(@.type.indexOf("c") > -1)]') // [ { type: ['c'] } ]
Sorry, something went wrong.
Thank you. Worked like a charm.
No branches or pull requests
Given a JSON such as:
I can't figure out how to get all nodes where type=='c'? Is there a 'contains value' operator or something like that?
Thanks.
The text was updated successfully, but these errors were encountered: