From 01586068c3d16e6055032025b5db04f420c6a330 Mon Sep 17 00:00:00 2001 From: Guillaume RISCHARD Date: Sun, 31 Aug 2014 03:32:45 +0200 Subject: [PATCH] Unwrap json --- js/level2.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/level2.js b/js/level2.js index 659271c..6472f45 100644 --- a/js/level2.js +++ b/js/level2.js @@ -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, complete: function( response ) { - data = JSON.parse( response.responseText ); + resp = response.responseText.slice(14); + + data = JSON.parse( resp ); weather = data.weather[0];