I'm trying to populate a table of inputs (textboxes and select list) with JSON data retrieved from a jQuery GET request. For the example I pre-set a variable with some data rather than making a get request. The textbox inputs are correctly populating with data, but the select lists will not populate.
Here is an example of the data that knockout receives and places in the table
var returnedData = [{
"taskID": "1",
"taskName": "test task",
"taskDetails": "details",
"employee": {
"employeeID": "1",
"employeeName": "John"
}
}, {
"taskID": "2",
"taskName": "another test",
"taskDetails": "some more details",
"employee": {
"employeeID": "2",
"employeeName": "Jane"
}
}];
On the official knockout tutorials, they use a textarea (I included it in the fiddle) to show how the data is formatted as it is being posted back to the server. The pre-loaded data is in the exact same format.
Anyway, here is a fiddle with the code.