You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: