title: Performing partial updates with KnockoutJS mapping plugin
body: <p>Right now, I'm using this JSON with the KO Mapping plugin and it's working fine:</p>
  
  <pre><code>{
    "Controls": [
      {
        "Fields": [
          {
            "Name": "emailField", 
            "Text": "email", 
            "Visible": true
          }, 
          {
            "Name": "hiddenField", 
            "Text": "text", 
            "Visible": true
          }
        ], 
        "Name": "form2", 
        "Type": "Form"
      }, 
      {
        "Data": [
          [
            "Federico Aloi", 
            20
          ], 
          [
            "Andres Lopez", 
            31
          ], 
          [
            "Pablo Perez", 
            32
          ]
        ], 
        "Fields": [
          {
            "Name": "nameField", 
            "Text": "Nombre", 
            "Visible": true
          }, 
          {
            "Name": "ageField", 
            "Text": "Edad", 
            "Visible": true
          }
        ], 
        "Name": "datagrid1", 
        "Type": "Datagrid"
      }
    ], 
    "Name": "pagina1", 
    "Title": "Probando el KO"
  }
  </code></pre>
  
  <p>Now my requirement is to perform "partial updates". Some scenarios when I'd like to do that:</p>
  
  <ul>
  <li>I need to change the Data array in the second control.</li>
  <li>I need to update only one Control and not the whole Page (this is the class I'm serializing, the root in this JSON).</li>
  <li>I need to add another Control to my Page.</li>
  </ul>
  
  <p>Perhaps another workaround would be recreating the original object with <code>ko.mapping.toJS(viewModel)</code>, change it and then re-map it again... but I believe that you will come out with something better.    </p>
  
  <hr>
  
  <p><strong>EDIT:</strong> I tried with <code>ko.mapping.fromJS(updatedControl, viewModel.Controls()[0])</code> but it didn't work, here is my code:</p>
  
  <pre><code>function (control) {
      $.getJSON($.format('api/control/{0}/{1}', viewModel.Name(), control.Name()), function (response) {
          ko.mapping.fromJS(response, viewModel.Controls()[0]);
      });
  },
  </code></pre>
  
  <p><em>response:</em></p>
  
  <pre><code>{
    "Fields": [
      {
        "Name": "emailField", 
        "Text": "email", 
        "Visible": true
      }, 
      {
        "Name": "hiddenField", 
        "Text": "text", 
        "Visible": true
      }
    ], 
    "Name": "form2", 
    "Type": "Form"
  }
  </code></pre>
  
  <p><strong>EDIT2:</strong> check it out at <a href="http://jsfiddle.net/faloi/4FcAy/10/">http://jsfiddle.net/faloi/4FcAy/10/</a></p>