i have this array:
[
{
"title": "fruit",
"categories": [
"apple",
"banana"
]
},
{
"title": "city",
"categories": [
"Brazil",
"EUA",
"China"
]
},
{
"title": "name",
"categories": [
"Ana"
]
}
]
i want to filter this by any terms that the users type
i already got this, works only for title, but i want to search by title and category:
array.filter(f => f.title.includes(myString))