-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
state: needs more infothe author of the issue needs to provide more detailsthe author of the issue needs to provide more details
Description
I retrieve an array json::iterator c = itr->find("nodes"); and try to iterate through all arrays in that array (nodes is array that contains arrays):
for (json::iterator ak = c.value().begin(); ak != c.value().end(); ++c)
string id = ak[0].get<string>();
I get error, because those iterators aren't of the same type:
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers"));
How should I iterate and access the elements from the iterated array? Couldn't find documentation on this very issue of object to array type iterator mismatch/switch.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
state: needs more infothe author of the issue needs to provide more detailsthe author of the issue needs to provide more details