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 and thank you for putting together this really helpful package!
I have a use case where I would like to keep matched objects synchronized.
For instance, using the data from the documentation:
from jsonpath import parse data = { "goods": [ {"price": 100, "category": "Comic book"}, {"price": 200, "category": "magazine"}, {"price": 200, "no category": ""} ], "targetCategory": "book" }
I would like to extract price and category keys into lists, but lists must have same lengths.
price
category
The following expression:
parse("$.goods[*].category").find(data)
outputs all matching items (which is already super cool :)) :
['Comic book', 'magazine',]
Is there a way to add 'None' for array items that do not contain the category key? I.e. having the following output:
['Comic book', 'magazine', None]
(Or any other way to achieve the desired result?)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Hi and thank you for putting together this really helpful package!
I have a use case where I would like to keep matched objects synchronized.
For instance, using the data from the documentation:
I would like to extract
price
andcategory
keys into lists, but lists must have same lengths.The following expression:
outputs all matching items (which is already super cool :)) :
Is there a way to add 'None' for array items that do not contain the
category
key? I.e. having the following output:(Or any other way to achieve the desired result?)
The text was updated successfully, but these errors were encountered: