Unwrap json

gh-pages
Guillaume RISCHARD 2014-08-31 03:32:45 +02:00
parent d167c73d02
commit 01586068c3
1 changed files with 3 additions and 1 deletions

View File

@ -145,7 +145,9 @@ function loadWeather() {
url: 'https://getcontents.herokuapp.com/?url=http://api.openweathermap.org/data/2.5/weather?units=metric&q=' + city + ',' + country + '&appid=' + appid, url: 'https://getcontents.herokuapp.com/?url=http://api.openweathermap.org/data/2.5/weather?units=metric&q=' + city + ',' + country + '&appid=' + appid,
complete: function( response ) { complete: function( response ) {
data = JSON.parse( response.responseText ); resp = response.responseText.slice(14);
data = JSON.parse( resp );
weather = data.weather[0]; weather = data.weather[0];