check string contain in array jquery code example
Example 1: jquery check value exists in array
if ($.inArray('example', myArray) != -1)
{
// found it
}
Example 2: find string in array javascript
var myarr = ["I", "like", "turtles"];
var arraycontainsturtles = (myarr.indexOf("turtles") > -1);