I'm currently attempting to connect to a Web service that returns a dynamic list. My goal is to retrieve the list in JSON format and then load it into a ko.observableArray
. Despite my successful call to the Web service, I keep encountering errors during the loading process. Can someone help me identify if there's an issue with my syntax?
function getEm(zip) {
$.ajax('/Services/TheatreLocationList.asmx/getTheatres', {
type : 'POST',
contentType : 'application/json; charset=utf-8',
dataType : 'json'
}).done(function(data) {
self.theatreData = ko.observableArray(data || [ ]);
});
}