How to get selected menu option from a knockout.js observableArray?
问题 I feel like I'm missing something very basic, but I can't get a dropdown menu to work as I expect using Knockout.js. I have a set of objects I want to present in a menu, and I need to find the selected option and post that to the server. I can get the menu to render, but can't seem to get the value of the selected item. My view model looks like this: function ProjectFilterItem( name, id ) { this.Name = name; this.Id = id; } function FilterViewModel() { this.projectFilters = ko.observableArray