I have the following array with nested arrays:
const options = [
[
{
label: "Blue",
option_id: "1"
},
{
label: "Small",
option_id: "2"
}
],
[
{
label: "Red",
option_id: "1"
},
{
label: "Large",
option_id: "2"
}
]
];
I want to create an array of objects from each pair, ex:
[
{
label: ”Blue Small“,
option_id: [1,2]
},
...
]
edit: thanks everyone for the great answers