I have this:
[
{ list: [ [Object], [Object] ] },
{ head: [ [Object], [Object] ] }
]
And want to turn it into this:
{
list: [ [Object], [Object] ],
head: [ [Object], [Object] ]
}
So an array of objects into an object. It would be great to achieve this with lodash.
_.reduce(array, function(memo, current) { return _.assign(memo, current) }, {})