Reputation: 131
I have a tuple which is basically like this:
t=(OrderedDict([('attributes', OrderedDict([('type', 'User'), ('url', '/services/data/v38.0/sobjects/User/0006Cx6pIAC')])), ('Name', 'Ben Dams')]),)
How do I extract just the 'Name' from the dictionary?
Upvotes: 0
Views: 41
Reputation: 164663
You have a single-value tuple which contains a dictionary. So just use indexing before accessing a dictionary key:
res = t[0]['Name'] # 'Ben Dams'
Upvotes: 2