How to create such a PHP array in JavaScript?
- by dfjhdfjhdf
How to create such a PHP array in JavaScript?
$arr = array('oneKey' => array('key1' => 'value1',
'key2' => 'value2'),
'anotherKey' => array('key1' => 'value1',
'key2' => 'value2'));
EDIT: 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.
EDIT2: Actually I won't "convert" it. It's a way I explain things. I am more of a php guy.