https://pulumi.com logo
Title
f

flat-nest-33539

03/31/2023, 10:50 AM
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

bright-air-36771

04/01/2023, 12:51 PM
I might be wrong but couldn't you do this in the map? (Haven't tested it)
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