I want to bind my text input value
<input type="text" id="2" data-bind="value : ??whatToWriteHere?? ">
to the second object's name property in the following observable object ( where input.id == object.id )
myObject = {
myArray : [ { id:1, name:'one' },{ id:2, name:'two' },{ id:3, name:'three' } ]
},
myObservableObject = ko.observable(myObject);
With what expression I should replace ??whatToWriteHere??
Edited: actually the array is not necesserily be inside another object
myArray : [ { id:1, name:'one' },{ id:2, name:'two' },{ id:3, name:'three' } ]
myObservableArray = ko.observableArray(myArray);