Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

search nested array in react javascript

products.find((product) => {
  return product.items.some((item) => {
//^^^^^^
    return item.name === 'milk';
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #search #nested #array #react #javascript
ADD COMMENT
Topic
Name
4+6 =