I'm trying to understand the knockout syntax and have the following question.
If I have the following view-model
var anotherObservableArray = ko.observableArray([
{ name: "Bungle", type: "Bear" },
{ name: "George", type: "Hippo" },
{ name: "Zippy", type: "Unknown" }
]);
the Array should be empty and not contain the hardcoded value as above.
I wants to populate this using jquery with this code
$.getJSON('api/market', self.markets);
How can i do that, and where should this getJSON code go? Can anyone help me with a example?