How to access a key in a stdclass
<p>I have this situation:</p>

<pre><code>object(stdClass)#203 (1) {
  ["1"]=&gt;
  object(stdClass)#212 (7) {
    ["user_id"]=&gt;
    int(1)
    ["type"]=&gt;
    string(6) "Device"
    ["name_first"]=&gt;
    string(0) ""
    ["name_last"]=&gt;
    string(0) ""
    ["name_display"]=&gt;
    string(0) ""
    ["gender"]=&gt;
    string(11) "Unspecified"
    ["birthday"]=&gt;
    string(0) ""
  }
}
</code></pre>

<p>I want to access either "user_id" or the ["1"], but this is of type stdclass so I can't treat it like an array. (Note: this is from <code>json_decode</code>)</p>
