title: knockout mapping json via Ajax call
body: <p>I try to map and bind JSON data directly in an Ajax call without success. The alert shows the requested data. If I copy/paste the content of this alert into a test variable, then the mapping works fine. Why can't I map/bind directly to the result? What could be the difference between 'test' and 'result.d'? (binding to result - without .d doesn't work either).</p>
  
  <p>Thanks for any help.</p>
  
  <pre><code> var test = { "formulier": { "titel": "test", "formulier_id": 4, "vragen": [{ "vraag_id": 5, "vraag": "Hoe gaat het?", "soortvraag_id": 4, "soortwaarde_id": 13, "verplicht": false, "antwoorden": [] }, { "vraag_id": 6, "vraag": "Dit is een kopje", "soortvraag_id": 18, "soortwaarde_id": 13, "verplicht": false, "antwoorden": [] }, { "vraag_id": 3, "vraag": "vraag 3k", "soortvraag_id": 6, "soortwaarde_id": 13, "verplicht": false, "antwoorden": [{ "antwoord": "nieuw2", "antwoord_id": 7, "vraag_id": 3, "iscorrect": true }, { "antwoord": "echt waar?", "antwoord_id": 5, "vraag_id": 3, "iscorrect": false }, { "antwoord": "nieuw 123", "antwoord_id": 2, "vraag_id": 3, "iscorrect": false }, { "antwoord": "nieuw", "antwoord_id": 6, "vraag_id": 3, "iscorrect": false }] }] } }
  
              // This doesn't work 
              $.ajax({
                          type: "POST",
                          contentType: "application/json",
                          url: "../formulierService.asmx/getLeegFormulier",
                          data: "{'id': " + 4 + "}",
                          dataType: "json",
                          success: function (result) {
                              alert(result.d); //content of alert was pasted into var test above
                              var ViewModel = ko.mapping.fromJS(result.d); 
                              ko.applyBindings(ViewModel);
                          }
              });
  
              // This does work
              var ViewModel2 = ko.mapping.fromJS(test);
              ko.applyBindings(ViewModel2);
  </code></pre>