<div data-bind="foreach: techniques"> <label> <input type="checkbox" data-bind="value: value, checked: $parent.selectedTechniques" /> <span data-bind="text: text"></span> </label> </div> <div data-bind="text: selectedTechniques().join(', ')"></div>
function ViewModel() { var self = this; self.techniques = [{ text: "ASP.NET Web Forms", value: "webforms" }, { text: "ASP.NET MVC", value: "mvc" }, { text: "ASP.NET Web API", value: "webapi" }]; self.selectedTechniques = ko.observableArray(); } ko.applyBindings(new ViewModel());