I'm trying to control what data should be serialized before sending it back to my server. To do this :
viewModel.prototype.toJSON = function () {
var copy = ko.toJS(this);
delete copy.QuoteListViewModel;
return copy;
};
But prototype is undefined and it fails.
viewModel is created by mvcKnockout and does exist because I can do things like:
viewModel.QuoteSelectedViewModel = ko.observable();
So why is prototype undefined ?