I using below object for search product from category object in vue.js.
I have try using that way but not working:
_.find(this.allCategories, _.flow(
_.property('product'),
_.partialRight(_.some, { product_name: "Shir" })
));
My object:
[{
"id": 2,
"name": "Shirt",
"product": [{
"id": 1,
"product_name": "Shirt 123",
"price": "150.00",
"image": "http://localhost/l9FRGvZDfb.jpeg"
}, {
"id": 4,
"product_name": "Shirt 456",
"price": "12.44",
"image": "http://localhost/A5rmGtOnW9.jpeg"
}]
}, {
"id": 2,
"name": "Froots",
"product": [{
"id": 1,
"product_name": "Apple 121",
"image": "http://localhost/Dfb.jpeg"
}, {
"id": 4,
"product_name": "Banana 121",
"price": "12.44",
"image": "http://localhost/tOnW9.jpeg"
}]
}]