How to sort object elements in javascript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1359761/sorting-a-javascript-object">Sorting a JavaScript object</a><br>
  <a href="http://stackoverflow.com/questions/5467129/sort-javascript-object-by-key">Sort JavaScript object by key</a>  </p>
</blockquote>



<p>I have array:</p>

<pre><code>var arr = {}
arr[2323] = 1
arr[123] = 1
...
arr[n+232323] = 1
</code></pre>

<p>How to get all element of aobject sorted by key ( number order ? )</p>

<pre><code>for ( key in arr ) {
     alert(typeof(key))
}
</code></pre>

<p>return string type.</p>
