unzipWith
_.unzipWith(iteratee, array)
# Ⓢ [Ⓣ][1] Ⓝ
This method is like _.unzip except that it accepts iteratee to specify
how regrouped values should be combined. The iteratee is invoked with the
elements of each group: (...group).
Since
3.8.0
Arguments
iteratee(Function): The function to combine
regrouped values.array(Array): The array of grouped elements to process.
Returns
(Array): Returns the new array of regrouped elements.
Example
var zipped = _.zip([1, 2], [10, 20]);
// => [[1, 10], [2, 20]]
_.unzipWith(_.add, zipped);
// => [3, 30]