title: HTTP get requests in ajax
body: <p>I am pretty new to javascript where I am trying with ajax to make an get request. I am trying to get the password from the response.</p>
  
  <p>Javascript code:</p>
  
  <pre><code> $(document).ready(function () {
      $("#LoginUser").click(function () {
          $.ajax({
              url: 'http://website/api/user/Mikkel1337',
              dataType: 'json',
              type: 'GET',
              contentType: 'application/json',
  
              error: function () {
                  alert("An error had occurred");
              },
              success: function (data) {
                  var jsonStr = JSON.stringify(data);
  
                  alert(jsonStr['password']);
              }
          });
      });
  })
  </code></pre>
  
  <p>The response JSON code looks like this:</p>
  
  <pre><code>{"userId":16,"firstName":"mojn","lastName":"mojn","email":"mojn@mojn.dk","accountName":"Mikkel1337","password":"123","userRoleId":1,"active":false,"userRole":null,"competetion":[],"judge":[],"team":[]}
  </code></pre>
  
  <p>When im running this I only get the error function. Any suggestions or solution is appreciated :)</p>