I have these arrays of arrays :
array0 = [["1"], ["2"], ["3"],…]
array1 = [["a"], ["b"], ["c"],…]
array2 = [["pap"], ["pop"], ["pip"],…]
I want to push every element in every array, to the first array so the output should be:
output = [["1", "a", "pap"], ["2", "b", "pop"], ["3", "c" ,"pip"]]
First do
flattenon each array to get single dimension array. Then usezipto get 2-dimension array each having 3-elementsShorter way of doing the same: (Solution given by @Ivaylo Strandjev)