title: AS3 Problem with decoding JSON data from PHP
body: <p>I am able to pull JSON data from PHP into my Flex application just fine with the following bit of code:</p>
  
  <pre><code>public function httpResult(event:ResultEvent):void { 
      var rawData:String = String(event.result);
      trace(String(event.result)); //shows correct order
      var as3Data:Object = JSON.decode(rawData);
  
      for (var i:* in as3Data)  {
          trace(i + ": " + as3Data[i].unit_price); //shows incorrect order
      }
  }
  </code></pre>
  
  <p>When I trace the result, I see the information I am pulling in the correct order.  </p>
  
  <blockquote>
    <p>{"100":{"unit_price":"2.9567"},"400":{"unit_price":"1.0991"},"800":{"unit_price":"0.7926"},"1200":{"unit_price":"0.6911"}}  {</p>
  </blockquote>
  
  <p>But, once I JSON.decode the result, somehow it re-orders the content.  And, puts the first item last.</p>
  
  <blockquote>
    <p>400: 1.0991,
    800: 0.7926,
    1200: 0.6911,
    100: 2.9567</p>
  </blockquote>
  
  <p>Does anyone have any ideas on why it would be doing this?  Or ideas on how I can re-order the Object myself?  </p>