title: Jquery ajax data convert to string
body: <p>I have a problem with my jquery ajax. I have this code:</p>
  
  <pre><code>$.ajax({
      url: '/users/validatepassword/'+current,
      success: function(data){
          status = data;
      },
      async: false
  });
  
  if(status == "Password correct")
  {
      //do something
  }
  </code></pre>
  
  <p>Basically, I want to capture the "data" that was returned on "success". But I cannot make a way for the if statement to work. I am think the "data" was not a string so I cannot make a comparison.</p>