I have nested dictionaries:
{\'key0\': {\'attrs\': {\'entity\': \'p\', \'hash\': \'34nj3h43b4n3\', \'id\': \'4130\'},
u\'key1\': {\'attrs\': {\'ent
Well, if you have to do it only a few times, you can just use nested dict.iteritems() to find what you are looking for.
If you plan to do it several times, performances will quickly becomes an issue. In that case you could :
change the way you data is returned to you to something more suitable.
if you can't, convert the data once the fly to a dict between id and keys (using iteritems). Then use it.