-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Iterating over sub-object #794
Labels
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Comments
You may want to look at iteration wrappers - here is an example how to use them https://github.com/nlohmann/json/blob/develop/doc/examples/iterator_wrapper.cpp. |
nlohmann
added
the
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
label
Oct 22, 2017
Thanks, worked :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm sorry but I'm completely lost
I just want to iterate over a value:
I even used std::cout just like the examples.
What am I doing wrong? It says
error: no member named 'key' in tile
but that makes no sense because im *iterator so I should already be ranged-for-ing over each tile.The examples also don't really provide any insight into iterating over things like these.
Iterating over the sub-object and then
std::cout << tile << std::endl;
works like expected, however that is just magic. I want to print the key and the value separately, one as a string and the other as an array using indexing operator.The text was updated successfully, but these errors were encountered: