-
Notifications
You must be signed in to change notification settings - Fork 29
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
How to get value in array of structures in json? #49
Comments
Obtaining individual data out of array is not yet supported by the library. This sounds like a useful idea to add. "list[1].a" (with Modelica-like one-based indexing) might be some proper identifier for your task. (Note that there is no array-syntax support in the underlying parson lib itself). |
Thanks for the answer. Yes, it would be great if processing of such json files was added. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If we have the next json:
{ "a" : 1.0, "b" : 2.0 }
then we can get the value "a" using getReal("a").
How to get the value "a" for example of the first element "list" for the following example:
{ "list" : [ { "a" : 1, "b" : 2 }, { "a" : 2, "b" : 1 } ] }
In the examples there is a case when an array of values is considered, but such a case is not considered, thanks.
The text was updated successfully, but these errors were encountered: