I have 3 separate arrays with 3 objects inside each of them:
[{Index: 1}, {Index: 2}, {Index: 3}]
[{Placement: 'Wall'}, {Placement: 'Roof'}, {Placement: 'Door'}]
[{Color: 'GREEN'}, {Color: 'WHITE'}, {Color: 'BLACK'}]
I'm trying to achieve the following:
[
{
Index: 1,
Placement: 'Wall',
Color: 'GREEN'
},
{
Index: 2,
Placement: 'Roof',
Color: 'WHITE'
},
{
Index: 3,
Placement: 'Door',
Color: 'BLACK'
}
]
Is there a way to do this with JS? i've tried combining these with underscore and jquery's merge/extend, but i'm only getting either all of the values in one object or objects with single values(e.g. color). Help highly appreciated.