Skip to main content

unzip

_.unzip(array) # Ⓢ [Ⓣ][1] Ⓝ

This method is like _.zip except that it accepts an array of grouped



elements and creates an array regrouping the elements to their pre-zip



configuration.

Since​

1.2.0

Arguments​

  1. array (Array): The array of grouped elements to process.

Returns​

(Array): Returns the new array of regrouped elements.

Example​

var zipped = _.zip(["a", "b"], [[1, 2]]);
// => [['a', 1], ['b', 2]]

_.unzip(zipped);
// => [['a', 'b'], [1, 2]]