I have dict on dict of dict . And I want a function which will return all the details if arguement matches the key like,

```
identifiers = {
     '42566431313931326462642d3533656132352033': {         
         'name': 'topleft',         
         'subid': {
            'a3e54b84450000': {
                'name': 'north'                
            }
        }        
    },
    '0942378098093': {         
         'name': 'topright',         
         'subid': {
            '4b840000100000000000': {
                'name': 'north'                
            }
        }        
    },
    '4256643131ra98892389': {         
         'name': 'bottomleft',         
         'subid': {
            'a3e54b840000100000000000': {
                'name': 'west'                
            }
        }        
    }
}

def getdetails(p):
    # p could be key of dict or dict of dict
    for key in identifiers:
        if key == p:
            return identifiers[key]        
        else:
            if p in identifiers[key]['subid']:
                return identifiers[key]['subid'][p]

```

I want to know if there is elegent way to do it (May be using map and lambda)?