my_array = [{name: 'Tom'}, {name: 'Fill'}]
search_input = 'Fill'
results_arr = list(filter(lambda x: x.name == search_input, my_array))
print(results_arr)
#object
def contains(list, filter):
for x in list:
if filter(x):
return True
return False
if contains(myList, lambda x: x.n == 3) # True if any element has .n==3
# do stuff