How to create such a PHP array in JavaScript?
<p>How to create such a PHP array in JavaScript?</p>

<pre><code>$arr = array('oneKey' =&gt; array('key1' =&gt; 'value1',
                               'key2' =&gt; 'value2'),
             'anotherKey' =&gt; array('key1' =&gt; 'value1',
                                  'key2' =&gt; 'value2'));
</code></pre>

<p><b>EDIT:</b> Guys, I forgot to mention that I would then need a simple way to sort those array('key1' => 'value1', 'key2' => 'value2') lexicographically by its keys.</p>

<p><b>EDIT2:</b> Actually I won't "convert" it. It's a way I explain things. I am more of a php guy.</p>
