Lodash _.unzip() Method
The _.unzip method is similar to _.zip (i.e.; it creates an array of grouped elements) except that it accepts an array of grouped elements and also creates an array regrouping the elements to their pre-zip configuration.
Parameters: This method accepts a single parameters as mentioned above and described below:
- array (Array): This parameter holds the array of grouped elements to process.
Return Value: This method is used to returns the new array of regrouped elements.
Example 1: Here, const _ = require(‘lodash’) is used to import the lodash library in the file.
[ [['a', 1, true], ['b', 2, false]] ]
[ [true, false] ]