I have N number of arrays in an array, for now N = 3
[[1,2,3, "a","b"] , [3,4,5,"c"], [6,7,8]...]
I would like for it to return
[[1,3,6], [2,4,7], [3,5,8], ...., ["a","c", ""], ["b", "",""]]
There are lot of solutions of combining two arrays but I want to handle any number of arrays. I would like for it to return above. I am looking to do this without underscore or jquery.
Values=[];
status = [[1,2,3, "a","b"] , [3,4,5,"c"], [6,7,8]];
status_name = status[0]; //take the longest one always
for (i = 0; i < status_name.length; ++i)
{
Values[i] =Array(status_name[i], status[i+1][i]);
}