title: stdClass Object problems
body: <p>I'm struggling to parse the below data using PHP. An API returns it, and I've tried various syntaxes. How do I return the data in a non-object way? Or, what's the syntax to call the data using the stdClass?</p>
  
  <p>Could I convert this to one data based array, or even two? I'm lost when it comes to object-based data sets. </p>
  
  <pre><code>stdClass Object
  (
      [0] =&gt; stdClass Object
          (
              [district] =&gt; stdClass Object
                  (
                      [state] =&gt; NY
                      [number] =&gt; 29
                  )
  
          )
  
      [1] =&gt; stdClass Object
          (
              [district] =&gt; stdClass Object
                  (
                      [state] =&gt; NY
                      [number] =&gt; 26
                  )
  
          )
  
  )
  </code></pre>
  
  <p>When i create the object on my own, and then do a var_dump, I get this:</p>
  
  <pre><code>object(stdClass)#8 (2) {
    [0]=&gt;
    object(stdClass)#4 (1) {
      ["district"]=&gt;
      object(stdClass)#5 (2) {
        ["state"]=&gt;
        string(2) "NY"
        ["number"]=&gt;
        string(2) "29"
      }
    }
    [1]=&gt;
    object(stdClass)#6 (1) {
      ["district"]=&gt;
      object(stdClass)#7 (2) {
        ["state"]=&gt;
        string(2) "NY"
        ["number"]=&gt;
        string(2) "26"
      }
    }
  }
  </code></pre>