title: Json api decoding
body: <p>here is my json  </p>
  
  <pre><code>{
    "rgInventory": {
             "5455029633": {
                             "id":"5455029633",
                             "classid":"310776543",
                             "instanceid":"302028390",
                             "amount":"1"
              }
    }
  }
  </code></pre>
  
  <p>Here is my way to parse json in php</p>
  
  <pre><code>$content = file_get_contents("http://steamcommunity.com/profiles/76561198201055225/inventory/json/730/2");
  $decode = json_decode($content);
  foreach($decode-&gt;rgInventory-&gt;5455029633  as $appid){
      echo $appid-&gt;id;
  }
  </code></pre>
  
  <p>I need to get that 5455029633 but it dont work in foreach.<br>
  And I want to store it in the variable too.</p>