I am trying to find a string inside an array so there is an input box and i type the value to be searched for. so i created a templated driven form and on submitting it, i stored its value inside variable like
onsubmit(){
let search=this.searchform.value
console.log(search)
}
So the value that gets displayed in console is
{search: "Bread"}
Now after running the line
let titles=this.itemlist.map(i=>i.title);
console.log(titles)
i have an array which contains the elements as
(2) ["Bread2", "Bread"]
How to search for string inside this array like the varaible "search" that gets consoled after submit the form needs to be search within this array