I am asp.net MVC developer.
In my model as follows,
public class GiftModel
{
public string Title { get; set; }
public double Price { get; set; }
}
controller=>
public ActionResult Test()
{
ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
GiftModel[] initialState = new[] {
new GiftModel { Title = "Tall Hat", Price = 49.95 },
new GiftModel { Title = "Long Cloak", Price = 78.25 }
};
return View(initialState);
}
but when executing I stuck here in script ,
initialValues= ""[{\"Title\":\"Tall Hat...ak\",\"Price\":78.25}]""
var result = ko.observable(initialValues)
this output no result