I have an view model with a lot of attributes and I want to detect any changes in order to store the model into my database.
I don´t want to subscribe to every single attribute, but to all at once
My approach with jQuery does not work at all
var MyModel = function(){
    var self = this;
    this.myMember1 = ko.observable(1);
    this.myMember2 = ko.observable(1);
    this.myMember3 = ko.observable(1);
    .....
     $.each(this, function (member, value) {
        member.subscribe(saveModel());
    })
}
Is there any known solution for my problem?
                        
The callback for
$.eachwill receive property name as 1st argument and property value as second. So in your case,memberis the property name andvalueis the observable value. Also subscribe need a function and what you give it is the result of a function call.So you need either:
or
If
saveModelis also a member ofMyModel, it should be referenced asself.saveModel.