Currently my code works perfectly as the Search function searches the Name field. I now want the Search function to also filter through Clubs.
My current code is:
if(search && search !== $w('#searchInput').placeholder) {
var lowerCase
var filteredSearch = originalRows.filter(item => item.fullName.toLowerCase().includes(search.toLowerCase()));
}
I would like the same search function to search item.footballClub
So if I search “Bar”, then it should filter BOTH the name “Bart” and the club “Barcelona” as an example. How can I do this as simply as possible?