I am getting 3 arrays from an api response obj. They can sometimes be empty or variable lengths.
Lets say I have these 3 arrays:
[]
["2a", "2b"]
["3a", "3b", "3c"]
I'd like to have the end result of combining these be a new array that contains 1 array per index:
[
["", "2a", "3a"],
["", "2b", "3b"],
["", "", "3c"]
]
Looking to see if someone has an "elegant" way to do this, as I can come up with a way to do this but it's rather grotesque.
Thanks