If I have a large multidimensional array (matrix), how can rearange the elements so that I have "y" values as the new "x" values in the array?
Hard to explain so let me give you an example. I want the below array.
[
[[0][1][2][3]],
[[4][5][6][7]],
[[8][9][10][11]],
[[12][13][14][15]],
]
to be transformed into the below array
[
[[0][4][8][12]],
[[1][5][9][13]],
[[2][6][10][14]],
[[3][7][11][15]],
]
for (var i = 0; i < tablesOfData.length; i++) {
for (var j = 0; j < tablesOfData[i].length; j++) {
//Transform the array
}
}