I have some JSON data collected via boost and I can not work out how to access some of the data that is in an array:
JSON data : {"dvm_gnd": {"num" : 4, "value": [1,2,3,4]}, "xx_gn" : {"num : 1, "value": 5}}
I can easily get the "num" and single "value" (5) out 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 out? What does the ptree.get() return?
Thanks
Ross