search through nested list react code example
Example: search nested array in react javascript
products.find((product) => {
return product.items.some((item) => {
//^^^^^^
return item.name === 'milk';
});
});
products.find((product) => {
return product.items.some((item) => {
//^^^^^^
return item.name === 'milk';
});
});