Knockout JS - How to initialize a complex object as observable? <p>I have a ViewModel and have an observable property that will have a complex object after an edit link is clicked. This is a basic example of managing a set of Groups. User can click on the 'edit' link and I want to capture that Group in SelectedGroup property.</p> <p>But I'm not sure how should I initialize the SelectedGroup and make every peoperty in this object as observable to begin with. </p> <pre><code>function ManageGroupsViewModel() { var self = this; self.Groups = ko.observableArray(); self.IsLoading = ko.observable(false); self.SelectedGroup = ko.observable(); } </code></pre>