json - How to convert js to Ko.js -
i have ajax query populate dropdownlist .the list shows names of users fetched json string.
$.ajax({ url: "/home/getelement", type: "get", success: function (data) { collection = data;//global variable var option = new option("--select item--"); $('#dropdown').append(option); (var = 0; < data.length; i++) { var option = new option(data[i].name); $('#dropdown').append(option); } } });
how can convert ko.js
this knock out documentation on select elements:
Comments
Post a Comment