I am binding select list in knockout
Html:
<select data-bind="options: $parent.Languages, optionsValue:function(item) { return item.Value; }, optionsText: function(item) {return item.Text; }, value: LanguageID, valueUpdate: 'change'" />
on submit ==> var data = ko.mapping.toJS(viewModel1);
Controller:
Languages = new SelectList(this.Languages(), "ID", "LanguageName", SelectedLanguageID);
It returns the complete object in LanguageID = "Selected: true, ID: 1, LanguageName: "English" but i want that it should return only ID like LanguageID = 1
I already use subscribe method and assign