title: jquery ajax response: difference between Chrome and Firefox
body: <p>I'm not a front-end developer, and I'm working on a casual project, which requires AJAX getting a piece of JSON.</p>
  
  <pre><code>$('#btn1').click(function() {
      $.ajax({
          url: 'http://mywebsite.com/persons/mike',
          type: "get",
          success: function(response, textStatus, jqXHR){
              var age1 = JSON.parse(response).data.age; // works for Firefox
              var age2 = response.data.age; // works for Chrome
          },
          error: function(jqXHR, textStatus, errorThrown){
              console.log('Error')
          },
          complete: function(){
              console.log('Complete')
          }
      });
  });
  </code></pre>
  
  <p>I use Firebug in Firefox and Developer Tools in Chrome. The <code>response</code> is of type <code>Object</code> in Chrome, and is a <code>String</code> in Firefox.</p>
  
  <p>Is there a generic way to do AJAX in jQuery and successfully parse the response?</p>