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.
I think an even shorter solution would be:
Object.assign({}, ...array)
I know you asked for lodash, but it doesn't seem like you even need this way. Unless you want to use _.extend
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With