tried using the following but it’s not the solution
controller:
var list = new [] { "one", "two", "three" };
ViewData["List"] = javaScriptSerializer.Serialize(list);
jquery:
var list = [ '@ViewData["List"]' ];
$("#numbers").autocomplete({
source: list
});
In your page (presumably razor, based on your syntax), declare your list as so:
In your current implementation the HtmlHelper is encoding your string to display correctly in a webpage, which you obviously do not want (hence the use of HtmlHelper.Raw) and you are also nesting an array within an array.