How to use JSONP GET request with the OpenWeatherAPI?
问题 I am trying to use the OpenWeatherAPI to perform get JSONP data using a JQuery get request. I have structured my query like this: function getWeather(callback) { var weather = 'http://openweathermap.org/data/2.1/find/city?lat=13.3428&lon=-6.2661&cnt=10&jsoncallback=?'; jQuery.getJSON(weather, callback); } // get data: getWeather(function(data){ console.log('weather data received'); }); I get the following error message: SyntaxError: invalid label However, the data is being returned as I can