61
rated 0 times
[
67]
[
6]
/ answers: 1 / hits: 46361
/ 15 Years ago, mon, july 13, 2009, 12:00:00
I have:
var keys = [ height, width ];
var values = [ 12px, 24px ];
And I'd like to convert it into this object:
{ height: 12px, width: 24px }
In Python, there's the simple idiom dict(zip(keys,values))
. Is there something similar in jQuery or plain JavaScript, or do I have to do this the long way?
More From » json