-
Hello, I have this json which contains a json-type array, but it does not seem an array.
I am reading it using this piece of code, after I read the documentation here: https://github.com/nlohmann/json#stl-like-access
Is there an alternative using range-loops withount using I am trying to do this
Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is no array in that JSON. Arrays are marked with The first loop you posted is the proper way to loop over JSON objects when you need to know the keys. Why are you trying to remove |
Beta Was this translation helpful? Give feedback.
There is no array in that JSON. Arrays are marked with
[]
characters. You just have objects and strings.The first loop you posted is the proper way to loop over JSON objects when you need to know the keys. Why are you trying to remove
.items()
andkey/value
?