Includes method working for only one Value but i want to filter multiple values with comma like this "mahmoud, faizan" i'll get these value from user input
json Data
[{
"text": "adnan hassan"
}, {
"text": "adnan hassan mahmoud",
}, {
"text": "adnan hassan faizan",
}]
Filter Function
const filterFunction = (a) => {
if(includeKeyword)
return a.text.includes("mahmoud")
}
Filter Function with map render
postRes.filter(filterFunction).map((data, index) => (