title: ko.mapping.fromJS(rawJSON) resulted in a undefined object
body: <p>What is the best way to find out why this resulted in a undefined viewModel, after the ko.mapping.fromJS line?</p>
  
  <p>The rawJSON looks fine in the chrome js object explorer</p>
  
  <pre><code>    var viewModel = ko.mapping.fromJS(rawJSON);
          viewModel = decorateViewModel(viewModel);
          ko.applyBindings(viewModel);
  </code></pre>
  
  <p>view in chrome:</p>
  
  <pre><code>rawJSON: Object
     Companies: Array[1]
     CompaniesFollowing: Array[0]
     DisplayName: null
     DateCreated: "2013-03-11T21:50:21.9"
     __proto__: Object
  viewModel: undefined
  
  
  
    function decorateViewModel(viewModel){
              viewModel.CompaniesFollowing().forEach(function(self) {
                  self.isFollowing = ko.observable(true);
                  self.toggleIsFollowing = function () {
                      if(self.isFollowing()){
                          unFollowCompany()}
                      else{
                          followCompany();
                      }
                      self.isFollowing(!self.isFollowing());//reverse it so the user can see the button text change
                  };
                  self.followButtonText = ko.computed(function () {
                      return self.isFollowing() ? "Unfollow" : "Follow";
                  });
                  self.styleClass = ko.computed(function () {
                      return self.isFollowing() ? "radius button" : "radius secondary button";
                  });
              });
  </code></pre>
  
  <p>the rawJSON:</p>
  
  <pre><code>  var rawJSON = { "Companies" : [ { "DateCreated" : "2013-03-11T21:53:31.123",
       "Description" : "eee",
       "EquityOffered" : 3.0,
       "FollowingUsers" : null,
       "Id" : 1,
       "InvestmentFound" : 0.0,
       "InvestmentSought" : 3333.0,
       "LogoFileName" : "4ED564E6-CDBB-4045-8E55-9581B7FA13E0.jpg",
       "Name" : "Model Adapt",
       "SocialDetails" : null
     } ],
    "CompaniesFollowing" : [  ],
    "DateCreated" : "2013-03-11T21:50:21.9",
    "DateUpdated" : "2013-03-11T21:50:21.9",
    "DisplayName" : null,
    "FullName" : null,
    "HomeAddress" : null,
    "Id" : 1,
    "Investor" : { "AvailableFunds" : 0.0,
        "DateCreated" : "2013-03-11T22:30:07.273",
        "DateUpdated" : "2013-03-11T22:30:07.273",
        "Description" : "kbibkb",
        "FollowingUsers" : [  ],
        "Id" : 1,
        "Interests" : "bukb",
        "LogoFileName" : null,
        "Name" : "giu",
        "Skills" : "kbku",
        "SocialDetails" : null
      },
    "InvestorsFollowing" : [ { "AvailableFunds" : 0.0,
          "DateCreated" : "2013-03-11T22:30:07.273",
          "DateUpdated" : "2013-03-11T22:30:07.273",
          "Description" : "kbibkb",
          "FollowingUsers" : [  ],
          "Id" : 1,
          "Interests" : "bukb",
          "LogoFileName" : null,
          "Name" : "giu",
          "Skills" : "kbku",
          "SocialDetails" : null
        } ],
    "LogoFileName" : null,
    "MiniAbout" : null,
    "UserName" : "Master_"
  }
  </code></pre>