title: Use JSON,AJAX & JQuery to retrieve and display the Guardian API
body: <p>I'm trying to retrieve the news titles from the guardian by using their API. As mentioned, I'm using JSON, AJAX and Jquery. My Jquery code is below.</p>
  
  <pre><code>$(document).ready(function() {  
  $.ajax({
      type: "GET",
      dataType: "jsonp",
      cache: false,
      url: "https://content.guardianapis.com/search?api-key=xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
      success: function(data) {
          for (var i = 0; i &lt; data.response.results.length; i++) 
          {
          $('#head-article').append("&lt;h1&gt;" + data.response.results[i].webTitle + "&lt;/h1&gt;");
          }
          console.log(data);
          }
      });
   });
  </code></pre>
  
  <p>Where have I went wrong? Thanks in advance</p>