I want to lowercase product.productName before filter, but I couldn't do that. I tried some thing but didn't work. Is there any way that I can lowercase product.productName before filter?
Simply convert to lowercase inside filter before comparing.
e.g.
product.productName.toLowerCase().includes ....
.
If it complains about being an object, convert to string first.
product.productName.toString().toLowerCase().includes ....