I have 3 regular arrays in javascript
1st array : ids[] (contains list of ids)
2nd array : country[] (contains list of names of countries)
3rd array : codes[] (contains list of codes of countries)
I need to create an object array say 'comb' from these three arrays having keys as "id", "name" and "code" and the respective values from the 3 arrays.
Eg: This is what i want from the regular arrays
var comb = [
{id:1, name:'United States',code:'US'},
{id:2, name:'China',code:'CH'}
];
Can anyone please tell me how to achieve this