Javascript – Search Data from Array of object and inside object array of Object
In the below data array if a user is able to search with Fruits (Category) or Apple (Subcategory). const data = [ { "category": "Fruits", "subCategory": [ { "id": 1, "val": "Apple" }, { "id": 2, "val": "Banana" } ]…