title: How to parse nested arrays inside json using C++
body: <p>I know how to parse "normal" looking <code>JSON</code> data in <code>C++</code>. Usually, I do this, using <code>boost::property_tree</code> and <code>read_json</code> method. It may look like so:</p>
  
  <pre><code>BOOST_FOREAH(ptree::value_type &amp;v, pt.get_child("rows"){
      vec.push_back(v.second.get&lt;std::string&gt;("key"));
  }
  </code></pre>
  
  <p>and the code above corresponds to this JSON file:</p>
  
  <pre><code>{
      "rows":[{
           "key":"1"
       },{
           "key":"2"
       }]
  }
  </code></pre>
  
  <p>However, the <code>Neo4j</code> result-set that I get, looks like:</p>
  
  <pre><code>{
      "columns":{...},
      "data":[[["object 1"]], [["object 2"]], [["object 3"]]]
  }
  </code></pre>
  
  <p>I'm interested and want to parse <code>"data"</code> node. I tried to do it like so:</p>
  
  <pre><code>BOOST_FOREAH(ptree::value_type &amp;v, pt.get_child("data"){
      vec.push_back(v.second.data());
  }
  </code></pre>
  
  <p>but this does not work. I do not get an error, but my vector <code>vec</code> remains empty, or to be more precise it is populated with empty values. So, that when I iterate through this <code>vec</code> I see a number of elements, but they do not have any value. Whereas, I want to have values <code>"object 1"</code>, <code>"object 2"</code>, <code>"object 3"</code>.</p>