So I am trying to access a data in an object, but I'm not sure how to do it. I tried with
myObj.weather["humidity"];
and
myObj.weather[1];
I am tring to acces for example the humidity from the json "82" but i getting "undefined"
<!DOCTYPE html>
<html>
<body>
<h2>Creating an Object from a Object Literal</h2>
<p id="demo"></p>
<script>
const myObj = {"code":200,"weather":[{"feels_like":21.48,"humidity":82,"pressure":1011,"temp":21.17,"temp_max":23.47,"temp_min":19.55}]};
document.getElementById("demo").innerHTML = myObj.weather["humidity"];
</script>
</body>
</html>