I'd like to merge two arrays in one but the indexes have to be respected as data are dynamics
I've tried this :
labels[0].forEach(element=>{
labels[0]=(element.map((e, i) => e +','+ tableauCompare[i]));
})
but I get two strings
My Input:
[
["string1", "string2","string3"],
["string1b", "string2b","string3b"]
]
["string4", "string4b"]
Expected output:
[
["string1", "string2","string3","string4"],
["string1b", "string2b","string3b", "string4b"]
]
I expect a new array, like the last one, but I get an array with two strings