{"action":"created","issue":{"url":"https://api.github.com/repos/ga-dc/pbj-project4/issues/10","labels_url":"https://api.github.com/repos/ga-dc/pbj-project4/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/ga-dc/pbj-project4/issues/10/comments","events_url":"https://api.github.com/repos/ga-dc/pbj-project4/issues/10/events","html_url":"https://github.com/ga-dc/pbj-project4/issues/10","id":106583351,"number":10,"title":"Accessing JSONP objects in Angular","user":{"login":"M00staff","id":12723877,"avatar_url":"https://avatars.githubusercontent.com/u/12723877?v=3","gravatar_id":"","url":"https://api.github.com/users/M00staff","html_url":"https://github.com/M00staff","followers_url":"https://api.github.com/users/M00staff/followers","following_url":"https://api.github.com/users/M00staff/following{/other_user}","gists_url":"https://api.github.com/users/M00staff/gists{/gist_id}","starred_url":"https://api.github.com/users/M00staff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M00staff/subscriptions","organizations_url":"https://api.github.com/users/M00staff/orgs","repos_url":"https://api.github.com/users/M00staff/repos","events_url":"https://api.github.com/users/M00staff/events{/privacy}","received_events_url":"https://api.github.com/users/M00staff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-15T15:36:28Z","updated_at":"2015-09-15T15:41:35Z","closed_at":null,"body":"So apparently i have to use JSONP to access my API because of some cross domain issues. \r\n\r\nI was wondering why the following code works in JS/jQuery\r\n```\r\n$.ajax({\r\n  type: \"GET\",\r\n  url: \"https://archive.org/advancedsearch.php?q=BrothersPast&fl%5B%5D=identifier,title&sort%5B%5D=&sort%5B%5D=&sort%5B%5D=&rows=50&page=1&output=json&callback=callback\",\r\n  dataType: 'jsonp',\r\n  success: function(data) {\r\n      var shows = data.response.docs;\r\n        console.log(shows);                       // testing the return object\r\n```\r\n\r\n\r\nbut this doesn't work in Angular\r\n```\r\n$http.jsonp('https://archive.org/advancedsearch.php?q=BrothersPast&fl%5B%5D=identifier,title&sort%5B%5D=&sort%5B%5D=&sort%5B%5D=&rows=50&page=1&output=json&callback=JSON_CALLBACK')\r\n  .then(function(data) {\r\n\r\n    var shows = data.response.docs;\r\n    console.log(shows);\r\n```\r\n\r\nI get the error \"TypeError: Cannot read property 'docs' of undefined"},"comment":{"url":"https://api.github.com/repos/ga-dc/pbj-project4/issues/comments/140436437","html_url":"https://github.com/ga-dc/pbj-project4/issues/10#issuecomment-140436437","issue_url":"https://api.github.com/repos/ga-dc/pbj-project4/issues/10","id":140436437,"user":{"login":"RobertAKARobin","id":6268177,"avatar_url":"https://avatars.githubusercontent.com/u/6268177?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertAKARobin","html_url":"https://github.com/RobertAKARobin","followers_url":"https://api.github.com/users/RobertAKARobin/followers","following_url":"https://api.github.com/users/RobertAKARobin/following{/other_user}","gists_url":"https://api.github.com/users/RobertAKARobin/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertAKARobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertAKARobin/subscriptions","organizations_url":"https://api.github.com/users/RobertAKARobin/orgs","repos_url":"https://api.github.com/users/RobertAKARobin/repos","events_url":"https://api.github.com/users/RobertAKARobin/events{/privacy}","received_events_url":"https://api.github.com/users/RobertAKARobin/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T15:41:35Z","updated_at":"2015-09-15T15:41:35Z","body":"Is there any data in it?"}}