unzip source npm
_.unzip(array)
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.
Arguments
- array (Array)
The array of grouped elements to process.
Returns (Array)
Returns the new array of regrouped elements.
Example
var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
// => [['fred', 30, true], ['barney', 40, false]]
_.unzip(zipped);
// => [['fred', 'barney'], [30, 40], [true, false]]