Let's say I have the following output in JSON. I want to pull tags for a particular hostname, is there a way to do it without looping through it? I want to grab the tags for myhost1.mydomain.local How can I accomplish this?
{'Members': [{'Addr': None,
'Name': 'myhost1.mydomain.local',
'Port': 7946,
'Status': 'alive',
'Tags': {'cluster_group': 'even',
'datacenter': 'mco',
'environment_id': 'mco-sc'}},
{'Addr': None,
'Name': 'myhost2.mydomain.local',
'Port': 7946,
'Status': 'alive',
'Tags': {'cluster_group': 'odd',
'datacenter': 'mco',
'environment_id': 'mco-sf'}}]}
print myjson["Members"][0]["Tags"] would print out the first element but the host could be in any position.