Given following dictionary:
recs = [
{'id': 1,
'custom': {
{'tag': 'A'},
{'tag': 'B'},
{'tag': 'C'},
{'name': 'Max'}
}
},
{'id': 2,
'custom': {
{'tag': 'A'},
{'tag': 'C'},
{'note': 'Note for 2'}
}
},
{'id': 3,
'custom': {
{'tag': 'B'},
{'tag': 'C'},
{'value': 12}
}
},
{'id': 4,
'custom': {
{'tag': 'A'},
{'tag': 'B'},
{'tag': 'C'}
}
}
]
What would be the most optimal solution to search by list of tags ideally without additional modules, such as Pandas.
For example: tag
== [A
, B
, C
] will return
id=1 and id=4