Hi i have a object array which holds some values and i want to put it in a data bind but then on a event change pass in the id of the chosen selected option.
i have so far:
knockout:
<select data-bind="options: Model.Products,
optionsText: 'Name',
event: { change: function(){Model.TestFunction(Model.Products.Id);} }"
></select>
how my object is structured example:
Model.Products():
0: Object
Cost: 0
Id: "2e481911-cff3-e411-80cf-000d3ab07471"
Name: "Product 1"
__proto__: Object
javascript
TestFunction: function (o){
var test = o;
}