In my controller:
public ActionResult GetCountryList() {
return Json(new {data = db.Country.ToList()},JsonRequestBehavior.AllowGet);
}
in my ko:
self.GetCountryList = function () {
$.getJSON("/ProfileCore/GetCountryList", function (result) {
self.LocationList(result.data);
console.log(self.LocationList());
})
};
select html:
<select data-placeholder="Location" class="chosen-select" style="width:100%;" tabindex="2" data-bind="options:LocationList, optionsText:'CountryName', optionsValue:'Id', value:Location"></select>
when I view the console log this is the result:

the result is there is no data in select option. any suggest in how to do this in the right way? thanks