js search through array for string code example
Example 1: find string in array javascript
var myarr = ["I", "like", "turtles"];
var arraycontainsturtles = (myarr.indexOf("turtles") > -1);
Example 2: javascript filter array match includes exact
let format = arrayList.filter(function (el) {
return el.name.toLowerCase() === name.toLowerCase();
});