Assume I have this:
[ {\"name\": \"Tom\", \"age\": 10}, {\"name\": \"Mark\", \"age\": 5}, {\"name\": \"Pam\", \"age\": 7} ]
and by searchin
people = [ {'name': "Tom", 'age': 10}, {'name': "Mark", 'age': 5}, {'name': "Pam", 'age': 7} ] def search(name): for p in people: if p['name'] == name: return p search("Pam")