-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
Filtering nested JSON #1316
Comments
Hi @ArnieO, Unfortunately, the filtering feature doesn't allow selecting an element in an array. As a workaround, I suggest that you use the "deserialization in chunks" technique. I wish ArduinoJson could support array filtering, but I could not find an API that supports all use cases.
Suggestions are welcome. Best regards, |
Bonjour @bblanchon, Thank you for your rapid answer. I realize there must be many and varying wishes for filtering methods, and that it could increase size of embedded code if implemented. So it is a understandable approach to keep this functionality on a basic level. I looked at the "deserialization in chunks" method. Best regards, |
Thanks for the update. |
Bonjour Benoît!
I'm working on the below JSON (API link: https://api.apispreadsheets.com/data/782)
I'd like to filter out one of the five sections, representing data for one region.
Using http://www.jsonquerytool.com/ I am able to do that with a JavaScript query
input["data"][2]
But I have not succeeded in finding how to obtain the same using the filtering function.
I've tested various alternatives using https://wandbox.org/permlink/KKc8gjsesx6yru7V and what I find is:
jfilter["data"][0] = true;
returns the entire JSONjfilter["data"][1] = true;
returns this :{ "data": [] }
I'd greatly appreciate your guidance!
JSON example data, in case above API link no longer works:
The text was updated successfully, but these errors were encountered: