c++ - Looping over an array in RapidJson and getting the object elements -


how value out of constrvalueiterator? in case know elements of array dictionaries (aka objects).

code summed up:

for (rapidjson::value::constvalueiterator itr = rawbuttons.begin(); itr != rawbuttons.end(); ++itr) { // ok     if (itr->hasmember("yes")) { // ok         auto somestring = itr["yes"]->getstring(); // error     } } 

um. iterators need dereferenced or whatever it's called.

for (rapidjson::value::constvalueiterator itr = rawbuttons.begin(); itr != rawbuttons.end(); ++itr) { // ok     if (itr->hasmember("yes")) { // ok         auto somestring = (*itr)["yes"]->getstring(); // bingo     } } 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -