title: Access a nested object array
body: <p>Hey guys I can't seem to get the syntax here right, I'm just trying to see if type exists,
  I've tried</p>
  
  <pre><code>if($obj-&gt;type)    /* do something */
  if($obj[0]-&gt;type) /* do something */
  if($obj-&gt;type[0]) /* do something */
  </code></pre>
  
  <p>On this</p>
  
  <pre><code>stdClass::__set_state(
  array(
     '0' =&gt; 
    stdClass::__set_state(
    array(
       'report_number' =&gt; '555',
       'type' =&gt; 'citrus',
       'region' =&gt; 'Seattle',
       'customer_number' =&gt; '9757',
       'customer' =&gt; 'The Name',
       'location' =&gt; 'West Seattle, WA',
       'shipper' =&gt; 'Yamato Transport',
       'po' =&gt; '33215',
       'commodity' =&gt; 'RARE',
       'label' =&gt; 'PRODUCE',
    )),
  ))
  </code></pre>
  
  <p>But just can't seem to get it right, I believe it has something to do with
  [0] being an int instead of varchar but I have no idea....</p>