I have the following which contains a list of names
var myList = @Html.Raw(new JavaScriptSerializer().Serialize(Model.Names));
I have a textbox in which the user enters a name and I have to search through myList and see if it contains that name?
How can I do that? I can see the data in myList are as follows:
Albert, Jack, Jim, Tom
Read textbox value :
var NameEntered = $("#Name").val();
e.g, If the user enters the name "Albert", it should be able to give me a true as answer in javasript or razor