I need help transforming a 3D array into a 2D array with specific dimensions. The current structure of my data is as follows:
[ [[0,0,345], [1,0,555], ... [9,0,333]], ... [[0,9,1000], [1,9,987], ... [9,9,129]] ]
The goal is to convert it into this format:
[[0,0,345], [1,0,355], ... [9,0,333], [0,1,1000], [1,1,987], ... [9,9,129]]
In the new format, the first element will represent the width value and the second element the height value. The third element will be a random number between 0 and 1023.
Both the width and height will have a value of 10. My aim is to eliminate the outermost array in the process.
I've attempted to iterate through each row and create a new array using push, but I'm getting unexpected results. Any assistance would be greatly appreciated!