title: 'Undefined' when trying to access json response
body: <p>My flask app has code that returns the following:</p>
  
  <pre><code>return json.dumps({'status': 'OK','url': 'www.blahg.com'})              
  </code></pre>
  
  <p>My javascript code looks like this:</p>
  
  <pre><code>$(function() {
    $('#mainbutton').click(function() {
          $.ajax({
              url: '/buttonclick',
              data: $('form').serialize(),
              type: 'POST',
              success: function(response) {
                  console.log(response);
                  console.log(response.url);
              },
              error: function(error) {
                  console.log(error);
              }
          });
      });
  });
  </code></pre>
  
  <p>The first console log looks correct: <code>{"status": "OK", "url": "www.blahrg.com"}</code>, but when I try to access the <code>url</code> entry, I get 'undefined' as output. what am I doing wrong?</p>