title: C++ Poco - How to iterate thought a JSON array?
body: <p>I've seen some <a href="https://stackoverflow.com/questions/45044184/poco-iterating-nested-json-objects">examples</a> how to iterate thought nested <code>JSON</code> objects like:</p>
  
  <pre><code> "{ \"test\" : { \"property\" : \"value\" } }"
  </code></pre>
  
  <p>But now I need to iterate through a <code>JSON</code> array (the <em>children</em> <code>array</code> below):</p>
  
  <pre><code>"{ \"name\" : \"Franky\", \"children\" : [ \"Jonas\", \"Ellen\" ] }"
  </code></pre>
  
  <p>How can I achieve this?</p>
  
  <p>I can't see anywhere an example or even on the <code>POCO</code> documentation.</p>
  
  <p>I have this sample below, but can't get the array of <em>children</em>.</p>
  
  <pre><code>Poco::Dynamic::Var test = object-&gt;get("children");
  
  Poco::JSON::Array::Ptr subObject = test.extract&lt;Poco::JSON::Array::Ptr&gt;();
  
  for (it = subObject-&gt;begin(); it != subObject-&gt;end(); it++) // how to iterate here?
  {
      std::cout &lt;&lt; "my children:" &lt;&lt; it-&gt;first &lt;&lt; "\n";
  }
  </code></pre>