elegant-crayon-4967
01/23/2020, 12:52 AMconst org = aws.organizations.getOrganization()
accounts
is a property of that, but I have no idea how to get to it or print out it’s promiseconst orgAccounts = aws.organizations.getOrganization();
orgAccounts.accounts.forEach(account => {
console.log(account)
});
^ I thought would work, but get the error TypeError: Cannot read property 'forEach' of undefined
handsome-truck-95168
01/23/2020, 1:05 AMelegant-crayon-4967
01/23/2020, 1:06 AM(async () => {
const orgs = await aws.organizations.getOrganization();
orgs.accounts.forEach(account =>
console.log(account))
})()
handsome-truck-95168
01/23/2020, 5:08 PM