I have JSON data collected using boost, and I cannot figure out how to access some of the data in the array:
JSON data: {"dvm_gnd": {"num": 4, "value": [1,2,3,4]}, "xx_gn": {"num: 1," value ": 5}}
I can easily get "num" and a single value of "5" using:
BOOST_FOREACH(ptree::value_type &v, pt) { float value = v.second.get<float>("value") }
However, I have no idea how to access the elements of the array? What returns ptree.get ()?
thanks
Ross
source share