I have an array of objects that looks like so:
var A = [{key:"key1",val:1},{key:"key2",val:2},...,{key:"keyn",val:n}]
And I want to transform A to an object:
{
key1: 1,
key2: 2,
...
keyn: n
}
This usecase has never come up, but I was thinking of doing mapKeys and then mapValues and I feel there's a simpler answer. Thanks!