I want to ask if we can filtered id that contain certain word only in python. I have these two json files. and I want to filter the id for only contain 'def###'?
a= [{'id':'abc23','name':'aa','age':'22',
     'data':{'read':'','speak':''},
     'responses':{'a':1,'b':2}},
     {'id':'abc25','name':'bb','age':'32',
      'data':{'read':'','speak':''},
      'responses':{'a':1,'b':2}},
    {'id':'abc60','name':'cc','age':'24',
     'data':{'read':'','speak':''},
     'responses':{'a':1,'b':2}},
    {'id':'def23','name':'aa','age':'22',
     'data':{'read':'','speak':''},
     'responses':{'a':1,'b':2}},
     {'id':'def25','name':'bb','age':'32',
      'data':{'read':'','speak':''},
      'responses':{'a':1,'b':2}},
    {'id':'def60','name':'cc','age':'24',
     'data':{'read':'','speak':''},
     'responses':{'a':1,'b':2}}]
The output should be: ID 'def' only will be exis.
[{'id':'def23','name':'aa','age':'22',
'data':{'read':'','speak':''},
'responses':{'a':1,'b':2}},
{'id':'def25','name':'bb','age':'32',
'data':{'read':'','speak':''},
'responses':{'a':1,'b':2}},
{'id':'def60','name':'cc','age':'24',
'data':{'read':'','speak':''},
'responses':{'a':1,'b':2}}]
 
     
     
    