how to dynamically convert this type of array:
[
[a,b,c],
[d,e,f],
]
into
[
[a,d],
[b,e],
[c,f],
]
the length of the first array is not always the same size.
tried the following
for (var i = 0; i < multi.length; i++) { // 2
for (var j = 0; j < multi[i].length; j++) { // 3
multi2[j].push(multi[j][i])
}
}
it does not work