Channels
pulumi-ai
package-authoring
pulumi-cdk
oracle-cloud-infrastructure
learn-pulumi-events
linen
registry
built-with-pulumi
pulumi-cloud
contribex
testingtesting321
hacktoberfest
cloudengineering
yaml
pulumi-crosscode
content-share
finops
multi-language-hackathon
office-hours
workshops
blog-posts
localstack
welcome
gitlab
pulumi-kubernetes-operator
jobs
aws
pulumi-deployments
dotnet
golang
announcements
java
pulumiverse
python
install
getting-started
cloudengineering-support
testingtesting123
hackathon-03-19-2020
typescript
google-cloud
contribute
azure
kubernetes
docs
automation-api
status
general
Powered by
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?
Untitled
i’m trying to achieve an equivalent of this
Untitled
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
2 Views
#getting-started
Join Slack