title: How to get JSON child Items from large JSON files
body: <p>Here my code so far, but return null value:</p>
  <pre><code>for ($i=0 ; $i&lt;1000; $i++){
                  $link = $obj-&gt;results-&gt;address_components[$i];                  
                  var_dump($link-&gt;long_name);                 
              }
  </code></pre>
  <p>Tried to get json object off child items like in this google maps JSON, for example<code>**long_name**</code> and <code>**short_name**</code>. I need this value and combined with another mysql query results. But my code above always return NULL on the browser.</p>
  <pre><code>    {
          &quot;results&quot; : [
        {
           &quot;address_components&quot; : [
              {
                 &quot;long_name&quot; : &quot;1600&quot;,
                 &quot;short_name&quot; : &quot;1600&quot;,
                 &quot;types&quot; : [ &quot;street_number&quot; ]
              },
              {
                 &quot;long_name&quot; : &quot;Amphitheatre Pkwy&quot;,
                 &quot;short_name&quot; : &quot;Amphitheatre Pkwy&quot;,
                 &quot;types&quot; : [ &quot;route&quot; ]
              },
              {
                 &quot;long_name&quot; : &quot;Mountain View&quot;,
                 &quot;short_name&quot; : &quot;Mountain View&quot;,
                 &quot;types&quot; : [ &quot;locality&quot;, &quot;political&quot; ]
              }
              {
                 &quot;long_name&quot; : &quot;94043&quot;,
                 &quot;short_name&quot; : &quot;94043&quot;,
                 &quot;types&quot; : [ &quot;postal_code&quot; ]
              }
           ]
  ....
       }
  </code></pre>
  <p>Thanks for any suggestion.</p>
  <p>UPDATE: Also tried something like this: <code>$lat = $obj-&gt;results[0]-&gt;address_components-&gt;long_name;</code></p>