I new in Python and I am not sure it is a good idea to use dict of dict but here is my question. I have a dict of dict and I want to filter by the key of the inside dict:
field = 'id1' dict( (k,{field: d[field]}) for k,d in a.items() if field in d)