i have this from an API:
{"coord":{"lon":26.1,"lat":44.44},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"base":"stations","main":{"temp":27.98,"pressure":1011,"humidity":30,"temp_min":27,"temp_max":29},"visibility":10000,"wind":{"speed":1.5,"deg":80},"clouds":{"all":0},"dt":1535128200,"sys":{"type":1,"id":5986,"message":0.0256,"country":"RO","sunrise":1535081370,"sunset":1535130317},"id":683506,"name":"Bucharest","cod":200}
how can I get the humidity? here is my function which doesn't work:
$.getJSON("https://api.openweathermap.org/data/2.5/weather?q=Slatina,ro&appid=b877cc138ceeb7015615b7b122be7958&units=metric", function(result){
document.getElementById("vremeaText").innerHTML = result.weather[0].humidity;