I have an multidimensional array which looks like this:
[
["1","2","3","4"],
["1","2","3","4"],
["1","2","3","4"],
["1","2","3","4"]
]
What I am hoping to accomplish is combining everything into a single array by adding the values of the array by its index.
Expected result:
[4,8,12,16] //(adding the 4 array values with appropriate index)
I see Lodash has a method _.zip, but that does not accept array of arrays as input to give the correct value. Is there an easy to accomplish this?