Diagonally Array Rearrange

I want to rearrange my array to output the same values as before but changing the order of the array diagonally.
I have a grid that can grow bigger or smaller in this case its 3x3
Example input: 0,1,2,3,4,5,6,7,8

(grid example below of my array with diagonally mirroring)

0,1,2

3,4,5

6,7,8

convert to:

0,3,6

1,4,7

2,5,8

For a small array I can do it manualy but for big ones i would like that ability to calculate / convert the array.

This would probably work for C++ Thanks!! but I dont know how to code yet so I want to do things in blueprint.

I got it to work in Blueprint!

It should work like matrix transpose