title: Why does accessing Ajax response variable crash code?
body: <p>I have the following client script that makes a successful Ajax call:</p>
  
  <pre><code>$.ajax({
      type: "GET",
      url: "Register?handler=GeneratePassword",
      contentType: "application/json",
      dataType: "json",
      success: function (response) {
          var resp = response;
          var pwd = response.password;
          if (response.ok === true) {
              $("#genPwd").val(response.password);
          }
      },
      failure: function (response) {
          alert(response);
      }
  });
  </code></pre>
  
  <p>When I put a break-point on the line:</p>
  
  <pre><code>var resp = response;
  </code></pre>
  
  <p>Then <code>resp</code> is <code>{ok: true, password: "OkF6"}</code>. When I try and execute the following line:</p>
  
  <pre><code>var pwd = response.password;
  </code></pre>
  
  <p>the function just exits, no error, no exception, nothing. It just stops completely. What is wrong with this Ajax code of mine?</p>