I have JavaScript object array with the following structure:
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 want to extract object which has description
= "10 - 20 Days" and title
not contains "Grape"
Then my expected should be
{ "id": "3", "title": "Manggo", "description": "10 - 20 Days" }, { "id": "4", "title": "Orange", "description": "10 - 20 Days" }