Assume I have this:
[ {\"name\": \"Tom\", \"age\": 10}, {\"name\": \"Mark\", \"age\": 5}, {\"name\": \"Pam\", \"age\": 7} ]
and by searchin
This is a general way of searching a value in a list of dictionaries:
def search_dictionaries(key, value, list_of_dictionaries): return [element for element in list_of_dictionaries if element[key] == value]