title: console.log JSON data?
body: <p><strong>Problem</strong></p>
  
  <p>I'm trying to log the data returned from a JSON call, and <code>console.log(jsonData)</code> doesn't seem to be working.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>$(document).ready(function() {
      $("#users li a:first-child").click(function() {
  
          var id = this.href.replace(/.*=/, "");
          this.id = "delete_link_" + id;
  
          if(confirm("Are you sure you want to delete this user?"))
          {
              $.getJSON("delete.php?ajax=true&amp;id=" + id, function(data) {
                  console.log(data.success);
              });
          }
  
          return false;
      });
  });
  </code></pre>
  
  <p><strong>Returned by <code>delete.php</code></strong></p>
  
  <p><code>{"id": $id, "success": 1}</code> upon success.<br>
  <code>{"id": $id, "success": 0, "error": "Could not delete user."}</code> upon failure.</p>