I am calling nodejs function from bash script which returns JSON output like below:
[ { fullyQualifiedDomainName: 'XXXXXXXX',
hostname: 'XXXXXXXX',
id: XXXXXXXXxxxx,
primaryBackendIpAddress: 'XXXXXXXXxx',
primaryIpAddress: 'XXXXXXXXxx' },
{ fullyQualifiedDomainName: 'XXXXXXXX',
hostname: 'XXXXXXXX',
id: XXXXXXXXxxxx,
primaryBackendIpAddress: 'XXXXXXXXxx',
primaryIpAddress: 'XXXXXXXXxx' },
{ fullyQualifiedDomainName: 'XXXXXXXX',
hostname: 'XXXXXXXX',
id: XXXXXXXXxxxx,
primaryBackendIpAddress: 'XXXXXXXXxx',
primaryIpAddress: 'XXXXXXXXxx' },
{ fullyQualifiedDomainName: 'XXXXXXXX',
hostname: 'XXXXXXXX',
id: XXXXXXXXxxxx,
primaryBackendIpAddress: 'XXXXXXXXxx',
primaryIpAddress: 'XXXXXXXXxx' }]
I want to retrieve all the ids from above output. Is there a way to do this? Output can have details for n number of devices.