I am trying to convert the following 3D array into a 2D array. Currently, my data has the following structure.
[ [[0,0,345], [1,0,555], ... [9,0,333]], ... [[0,9,1000], [1,9,987], ... [9,9,129]] ]
into
[[0,0,345], [1,0,355], ... [9,0,333], [0,1,1000], [1,1,987], ... [9,9,129]]
so the first element contains a width value, and the second is the height value. The third value will be a random value from 0 to 1023.
As you see, the width and height will be 10 each. And I am trying to get rid of the outermost array.
I have tried to iterate for each row to bounce to a new array using push, but keep getting undesired forms. Any help will be appreciated!