Is there a way to sort/order keys in JavaScript objects?
<p>For example the following</p>

<pre><code>var data = {
    'States': ['NSW', 'VIC'],
    'Countries': ['GBR', 'AUS'],
    'Capitals': ['SYD', 'MEL']
}
for (var item in data) {
    console.log(item);
}
</code></pre>

<p>prints</p>

<pre><code>States
Countries
Capitals
</code></pre>

<p>Is there a way to sort alphabetically so that it prints</p>

<pre><code>Capitals
Countries
States
</code></pre>
