I have the following array of objects which I need to convert to one object. Is there an easy way to do this? I have underscore on the page. Maybe it can help.
[{John:{name:"John", age : 59}},{Dave:{name:"Dave", age:62}}]
to
{John:{name:"John", age : 59}, Dave:{name:"Dave", age:62}}
I think I can recurse over the array and make the final object but am hoping there is a more simple/better way. Any pointers appreciated as I'm a javascript noob.