title: How to access data in JSON response recieved from JQuery?
body: <p>How do I access the data stored in JSON that is returned in the complete function of a JQuery AJAX request. For example, I have the following code:</p>
  
  <pre><code>$.ajax({
      url: 'buildings.php',
      data: "building=" + building,
      complete: function (response) {
          alert(response.responseText);
          alert(response.name);
      }
  });
  </code></pre>
  
  <p>In the first alert it displays the following, which is the intended JSON data that I sent from PHP.</p>
  
  <pre><code>{"name":"HSB","description":"description","directionsURL":"directionsURL","imageArray":{"1":"URL 1","2":"URL 2"}}
  </code></pre>
  
  <p>In the second alert, it displays</p>
  
  <pre><code>undefined
  </code></pre>
  
  <p><strong>How do I access the data I received that is displayed in the first alert?</strong></p>