I can't find javascript equivalent for php array_keys() / array_values()
For people unfamiliar with php, the following js hash is specified:
var myHash = {"apples": 3, "oranges": 4, "bananas": 42}
How can I get an array of keys, i.e.
["apples", "oranges", "bananas"]
The same question with values, i.e.
[3, 4, 42]
You can use jQuery.
javascript hashmap
greg0ire May 02 '12 at 13:50 2012-05-02 13:50
source share