Date

“Array” Methods

_.unzip(array)

source npm package

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.

引入版本

1.2.0

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

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

示例
var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
// => [['a', 1, true], ['b', 2, false]]
 
_.unzip(zipped);
// => [['a', 'b'], [1, 2], [true, false]]