title: Chrome browser - unwanted sorting of data in ajax response
body: <p>I am returning an array of banners using json_encode like this from the AJAX handler code (PHP)- </p>
  
  <pre><code>echo json_encode(array("bannersData" =&gt;$bannersData));
  </code></pre>
  
  <p>The order of data is proper upto here, when it is echoed.</p>
  
  <p>However, in the AJAX response handling code (javascript part), I get a different sorting of the returned object (sorted by banner ID it seems) in chrome Version 26.0.1410.64 m. I am not sure whether we have any option to enforce keeping the original sort order intact. </p>
  
  <p><em>Here is the code -</em> </p>
  
  <pre><code>$.ajax({
  type: "POST",
  async: false,
  url: posturl,
  data:postdata,
  dataType: "json",
  success: function(msg){
  
      if($.isEmptyObject(msg.bannersData))
      {
          bannerOptionsHtml = "No Banner available";  
      }
      else
      {
          /*getting unexpectedly sorted result here*/
  
      }
  
  });
  </code></pre>
  
  <p><strong>Example data-</strong> </p>
  
  <p><em>Input</em></p>
  
  <p>When I do <code>echo json_encode()</code>, following is original ordering of data - </p>
  
  <pre><code>'fggd'             [12658]
  banner 2           [12653]
  Copy 2 of banner 1 [12655]
  Copy 3 of banner 1 [12656]
  Copy 4 of banner 1 [12657]
  sdfds = 'xyz'      [12654]
  </code></pre>
  
  <p><em>Outputs</em></p>
  
  <p>But, following is what I get in AJAX response - </p>
  
  <p><em>In chrome (sorting happening based on banner ID, it seems - R.H.S. column below is banner ID)</em></p>
  
  <pre><code>Test                [12652]
  banner 2            [12653]
  sdfds = 'xyz'       [12654]
  Copy 2 of banner 1  [12655]
  Copy 3 of banner 1  [12656]
  Copy 4 of banner 1  [12657]
  'fggd'              [12658]
  </code></pre>
  
  <p><em>In firefox (as expected)</em></p>
  
  <pre><code>'fggd'             [12658]
  banner 2           [12653]
  Copy 2 of banner 1 [12655]
  Copy 3 of banner 1 [12656]
  Copy 4 of banner 1 [12657]
  sdfds = 'xyz'      [12654]
  </code></pre>