-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Confused about iterating through json objects #49
Comments
Here is an extended example. |
Dear @DanTheColoradan Thanks for reporting. I'll check your issue once I'm back from holidays (next week). All the best |
Duplicate of #43 . The workaround is basically to (there is a better workaround for clang in the original issue): #define private public
#include <json.hpp>
#define private private |
Thanks! I'll fix it as soon as possible. |
@nlohmann No rush, we have a workaround. Enjoy the holidays :P |
This issue should have been closed by bb2671d. |
All iterators have now member functions |
Awesome. Thank you! |
If I have:
And I want to iterate through each, how would I do so?
My attempt so far has been similar to the following:
I've tried it a a few ways including - for example - creating a string for
new_currency[ "country" ]
first and then storing it in it likenew_currency[ "country" ] = my_string
, but I get errors such as:or
Could you provide some guidance? I'd really appreciate it!
The text was updated successfully, but these errors were encountered: