boost :: ptree finden? oder wie greife ich auf tiefe Arrays zu? C ++

Ich habe jetzt zu lange versucht, auf einen json_reader-ptree aus der boost-Bibliothek zuzugreifen.

Ich habe eine JSON-Datei, die sehr oft gekapselt wird: (Pseudo-JSON:)

"Foo": {
  "nameofFoo:"foofoo"
  "Bar": [{
    "BarFoo": 
      { BarFooDeep: { 
           BarFooDeepDeep: { 
            "BarFooValue1": 123 
            "BarFooValue2" : 456
          }
        }
      }
     "FooBar": [ {
        "FooBarDeep" :[ {
           FooBarDeepDeep:[ {
              FooBarValue1: "ineedthis"
              FooBarValue2: "andthis"
              } ]
           FooBarDeepDeep1:[ {
              FooBarValue1: "ineedthis"
              FooBarValue2: "andthis"
              } ]
        "FooBarDeep" :[ {
           FooBarDeepDeep2:[ {
              FooBarValue1: "ineedthis"
              FooBarValue2: "andthis"
              } ]
           FooBarDeepDeep3:[ {
              FooBarValue1: "ineedthis"
              FooBarValue2: "andthis"
              } ]
and so on .... won t complete this now...

Jetzt muss ich nur noch FooBarValue1 und FooBarValue2 von allen FooBar bekommen.

Ich weiß, dass ptree Arrays mit leeren Childs ("") zusammenfügt

Ich kann durch Iteration rekursiv auf alle untergeordneten Elemente zugreifen.

Aber gibt es keinen besseren Weg, um auf spezielle Werte zuzugreifen?

wie findet ptree funktioniert? Ich bekomme immer Compiler-Fehler ...

ptree jsonPT;
read_json( JSON_PATH, jsonPT);
ptree::const_iterator myIT = jsonPT.find("FooBarValue1");
double mlat = boost::lexical_cast<int>(myIT->second.data());

Fehler: Konvertierung von 'boost :: property_tree :: basic_ptree, std :: basic_string> :: assoc_iterator' in den nicht skalaren Typ 'boost :: property_tree :: basic_ptree, std :: basic_string> :: const_iterator' angefordert ptree :: const_iterator myIT = jsonPT.find ("FooBarValue1");

Kann mir jemand einen nützlichen Hinweis geben, wie ich auf diesen ptree zugreifen kann?!?