This particular inquiry was quite challenging for me to succinctly summarize in the title, so I do apologize if it may come across as misleading.
Within my possession is an array of arrays structured in the following manner:
array = [ [1,2,3,4,5,6,7,8,9],
[2,3,4,5,6,7,8,9,1],
[3,4,5,6,7,8,9,1,2],
[1,2,3,4,5,6,7,8,9],
[2,3,4,5,6,7,8,9,1],
[3,4,5,6,7,8,9,1,2],
[1,2,3,4,5,6,7,8,9],
[2,3,4,5,6,7,8,9,1],
[3,4,5,6,7,8,9,1,2]]
It can be observed that this structure resembles a table with the subarrays essentially representing the rows of said table.
The task at hand involves creating a function capable of taking the primary array and rotating it 90 degrees clockwise. This rotation would result in new subarrays comprising of the first index of each array, followed by the second index of each array, then the third index of each array, and so on. Ultimately, the aim is for the new main array to encompass arrays corresponding to each column within this dataset.
Your assistance would be greatly appreciated!