javascript array to object zipper code example
Example: javascript zipping arrays to object
var r = {},
i,
keys = ['one', 'two', 'three'],
values = ['a', 'b', 'c'];
for (i = 0; i < keys.length; i++) {
r[keys[i]] = values[i];
}
var r = {},
i,
keys = ['one', 'two', 'three'],
values = ['a', 'b', 'c'];
for (i = 0; i < keys.length; i++) {
r[keys[i]] = values[i];
}