Lodash.js - unzip() function
A simple Lodash.js example of the unzip() function, which creates an array of ungrouped elements by category. It is the opposite of the zip() function.
12345678910111213141516171819202122232425262728<!DOCTYPE html>charset="utf-8"name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"name="description" content="Tizen Angular.js example"Tizen lodash.js examplesrc="js/lodash.min.js"id="first"id="second"var firstDiv = document.getElementById('first');var secondDiv = document.getElementById('second');var firstValue = [['Tony', 42, 'passed'], ['Andrew', 19, 'failed'], ['Bart', 31, 'passed']];firstDiv.innerHTML = "Having the arrays: " + firstValue[0] + " and " + firstValue[1] + " and " + firstValue[2] + " and using the lodash unzip function, we will create an array of ungrouped elements by category and invoke an operation in it in the second parameter...";var result = _.unzip(firstValue);secondDiv.innerHTML = "...so we get 3 arrays of grouped values: <br><br>" + result[0] + "<br>" + result[1] + "<br>" + result[2];