Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript search an array of json for matching attribute

return restaurants.find(item => {
   return item.restaurant.food == 'chicken'
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #search #array #json #matching #attribute
ADD COMMENT
Topic
Name
9+6 =