My JavaScript object array is structured like this:
const fruits = [{ "id": "1", "title": "Banana", "description": "1 Minute" }, { "id": "2", "title": "Apple", "description": "2 - 3 Days" }, { "id": "3", "title": "Manggo", "description": "10 - 20 Days" }, { "id": "4", "title": "Orange", "description": "10 - 20 Days" }, { "id": "5", "title": "Grape blue", "description": "10 - 20 Days" }, { "id": "6", "title": "Grape red", "description": "10 - 20 Days" }]
I'm looking to filter out objects with description
= "10 - 20 Days" and title
doesn't include "Grape"
The expected result should be:
{ "id": "3", "title": "Manggo", "description": "10 - 20 Days" }, { "id": "4", "title": "Orange", "description": "10 - 20 Days" }