How to create such a PHP array in JavaScript?
Posted
by dfjhdfjhdf
on Stack Overflow
See other posts from Stack Overflow
or by dfjhdfjhdf
Published on 2010-05-31T13:41:33Z
Indexed on
2010/05/31
14:02 UTC
Read the original article
Hit count: 355
JavaScript
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.
© Stack Overflow or respective owner