I need to transform this ec2 tags (array)
[
{ Key: 'Name', Value: 'xxx' },
{ Key: 'role', Value: 'yyy' }
]
to
{
name : 'xxx',
role : 'yyy'
}
using jq and node.js. Could you help please regards
I need to transform this ec2 tags (array)
[
{ Key: 'Name', Value: 'xxx' },
{ Key: 'role', Value: 'yyy' }
]
to
{
name : 'xxx',
role : 'yyy'
}
using jq and node.js. Could you help please regards
You could use
Object.fromEntries
like this: