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:

http://knockoutjs.com/documentation/options-binding.html


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -