Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

py search and get objects from array

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
 
PREVIOUS NEXT
Tagged: #py #search #objects #array
ADD COMMENT
Topic
Name
1+6 =