cat * | jq '.cis[].properties.cloud_vm_display_name' | grep -v null
"azuXXXXX""azuXXXXX""azuXXXXXX""azuXXXXXX"
Need to extract cloud VM name from multiple json files where the array number is different in every file.
a = data1['cis'][0]['properties']['TenantsUses'][0]print(a)b = data1['cis'][]['properties']['cloud_vm_display_name']
File "", line 17b = data1['cis'][]['properties']['cloud_vm_display_name']^SyntaxError: invalid syntax
print(a) is providing correct output but the value [] for variable b is not known, need your support in finding the output.
To find the VM name from various json files which are generated for different servers.