title: Knockout MVC, bind model & add object to model
body: <p>How can I add an item to a <code>List&lt;ComplexObject&gt;</code> with <code>KnockoutJS</code>?</p>
  
  <p>This is my model:</p>
  
  <pre><code>public class MyModel
  {
     public List&lt;User&gt; Users { get; set; }
  }
  
  public class User
  {
     public int Id { get; set; }
     public string Name { get; set; }
  }
  </code></pre>
  
  <p>This is the client side script:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
     var viewModel = ko.mapping.fromJS(@Html.Raw(Json.Encode(Model)));
     ko.applyBindings(viewModel);
  
     // attempt:
     var newUser = [{ "Id": "13", "Name": "John" }];
  &lt;/script&gt;
  </code></pre>
  
  <p>How do I add <code>newUser</code> to the the <code>viewModel</code>?</p>