I'm getting this error when trying to loop over some JSON data: " Uncaught SyntaxError: Unexpected token : "
I can visit the .json file successfully, but I'm not able to access the content with the code I'm currently using. Json file is here: https://data.nba.com/data/v2015/json/mobile_teams/nba/2017/teams/pelicans_schedule_02.json
$.ajax({
type:"GET",
url:"https://data.nba.com/data/v2015/json/mobile_teams/nba/2017/teams/pelicans_schedule_02.json",
success: function(data) {
for (var i=0; i < data.gscd.g.length; i++) {
console.log(data.gscd.g.gid);
}
},
dataType: 'jsonp',
});
I've created a JSFiddle that shows a proper request via a separate API URL format. Am I missing something super simple here?