title: KnockoutJS Observable object of observables
body: <p>I want to make observable object of observables. For example: </p>
  
  <pre><code>        var Project = function(id, name, custId) {
              this.id = ko.observable(id);
              this.name = ko.observable(name);
              this.custId = ko.observable(custId);
          }
  
          var viewModel = function() {
  
                      this.newUpProj = ko.observable(new Project(null,null,null));
              ...
              }
  </code></pre>
  
  <p>Something like this... I want <code>newUpProject</code> to be observable and it's properties to be observables. I also tried <code>this.newUpProj = ko.mapping.fromJS(new Project());</code></p>
  
  <p>Edit1: It crates the object but it's properties(id, name...) are not observables...</p>
  
  <p>Edit2: Use in html:</p>
  
  <pre><code>&lt;div class="modal-body"&gt;
                  &lt;p&gt;&lt;input type="text" id="projNameTx" data-bind="value: newUpProj.name()" /&gt;&lt;/p&gt;&lt;br&gt;
                  &lt;p&gt;&lt;select data-bind="options: customers, optionsCaption: 'Choose...', value: newUpProj.custId(), optionsText: 'name', optionsValue: 'id'" 
                      size="1"&gt;&lt;/select&gt;&lt;/p&gt;
  
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button class="btn" data-bind="click: clearModal" aria-hidden="true"&gt;Close&lt;/button&gt;
                  &lt;button class="btn btn-primary" data-bind="click: updateFlag() ? updateProject : addProject, enable: newUpProj.custId() &amp;&amp; newUpProj.name()"&gt;Save&lt;/button&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>Correct values are loaded in the input and the select but the Save button never disables if the input is empty(for example), because the change don't go to the model. </p>