I am currently learning shell scripting and need your help!
> array = [{u'name': u'androidTest', u'arn': u'arn:XXX', u'created':
1459270137.749}, {u'name': u'android-provider2016-03-3015:23:30', u'arn':XXXXX', u'created': 1459365812.466}]
I have a list of dictionary and want to extract the arn
value from the dictionary. In python
it is pretty simple for example:
for project in array:
print project['arn']
How will I write the equivalent loop in bash? If I try something like this, it is not working:
for i in "$array"
do
echo $i['arn']
done
The suggested duplicate is for associative arrays, not a list of associative arrays.