lodash isequal arrays code example
Example 1: lodash compare array without order
var array1 = [['a', 'b'], ['b', 'c']];
var array2 = [['b', 'c'], ['a', 'b']];
_.isEqual(array1.sort(), array2.sort()); //true
Example 2: lodash map
_.each(markets, (obj, key) => { obj.symbol = key})console.log(markets)//=> { 'BTC/USD': { buys: 0, sells: 3, symbol: 'BTC/USD' }, 'DASH/BTC': { buys: 3, sells: 1, symbol: 'DASH/BTC' }, 'ETH/BTC': { buys: 3, sells: 2, symbol: 'ETH/BTC' } }