hey, any idea how to get an output like {accName1 ...
# getting-started
f
hey, any idea how to get an output like {accName1 => id1, accName2 => id2} with this snippet?
i’m trying to achieve an equivalent of this
b
I might be wrong but couldn't you do this in the map? (Haven't tested it)
Copy code
export const accountIds = accounts.map(k => {k.name: k.id})
Map always generates an array so i'm not sure if that's what you wanted