I have a dict of dicts `dict_of_dicts={1:{'id':1,'name':'joe'},2: {'id':2,'name':'jim'},3: {'id':3,'name':'bob'}}` (the structure is out of my control so I cannot define my dict more conveniently). I am looking to extract the id # (which also corresponds to the key of the upper dict) of the sub dict containing `'name':'bob'`. i.e I want to extract the id value for a specific name.

I have thought of a looping solution, but is there a more pythonic way to go about this? My attempt is below

```
for i in list(dict_of_dicts.values()):
    if i['name']=='bob':
        print(i['id'])

```