title: indistinctness about knockout in combination with mapping plugin
body: <p>I have a few problems using knockout in combination with the mapping pluging. (using knockout 3.0.0 and knockout.mapping 2.4.0)</p>
  
  <p>I have a viewmodel function:</p>
  
  <pre><code>ViewModel(){
     ....add extra functionality here for button click functions etc.
  
  };
  </code></pre>
  
  <p>and want to instantiate a viewmodel at startup:</p>
  
  <pre><code> var myViewModel = {};
  
   $(function () {
       //converting data received from asp.net to json.
       var jsonModel = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(this.Model, new Newtonsoft.Json.Converters.IsoDateTimeConverter()))';
  
       myViewModel = ko.mapping.fromJSON(jsonModel);
       ko.applyBindings(myViewModel);
   });
  </code></pre>
  
  <p>I tried some overloads of the fromJSON function (but they don't seem to work anymore):</p>
  
  <pre><code>myViewModel = ko.mapping.fromJSON(jsonModel, {}, new ViewModel());
  </code></pre>
  
  <p>and</p>
  
  <pre><code>myViewModel = ko.mapping.fromJSON(jsonModel, new ViewModel());
  </code></pre>
  
  <p>Also initiating the myViewModel to a new instance of ViewModel and passing in the myViewModel objects doesn't affect the outcome.</p>
  
  <p>also a ViewModel Function with input data doesn't seem to work:</p>
  
  <pre><code>function ViewModel(sourceData) {
          var self = this;
          this.data = ko.mapping.fromJSON(sourceData);
  
          //----- Open modal for editing customer
          self.OpenEditModal = function () {
              $('#customerModal').modal({ show: true });
          };
      };
  
      var myViewModel = {};
  
      $(function () {
          var jsonModel = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(this.Model, new Newtonsoft.Json.Converters.IsoDateTimeConverter()))';
          myViewModel = new ViewModel(jsonModel);
          ko.applyBindings(myViewModel);
      });
  </code></pre>
  
  <p>How do i add functionality to the viewmodel ?</p>
  
  <p>update: added fiddle: <a href="http://jsfiddle.net/Speedy7912/d8uVD/2/" rel="nofollow">http://jsfiddle.net/Speedy7912/d8uVD/2/</a> 
  p.s. extra problem: when binding function to click event, 2nd record isn't shown.</p>