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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -