0

I have the following JSON returned by an API.

{
    "latitude":45.452176,
    "longitude":9.2741193,
    "timezone":"Europe/Rome",
    "daily":{
        "data":[{
            "time":1580684400,
            "summary":"Clear throughout the day.",
            "icon":"partly-cloudy-day",
            "sunriseTime":1580712180,
            "sunsetTime":1580747580,
            "moonPhase":0.31,
            "precipIntensity":0.0001,
            "precipIntensityMax":0.0005,
            "precipIntensityMaxTime":1580767200,
            "precipProbability":0.09,
            "precipType":"rain",
            "temperatureHigh":61.98,
            "temperatureHighTime":1580739180
        }]
    },
    "offset":1
}

I use this code to access the latitude:

pippo = JSON.parse(data);
console.log(pippo.latitude);

but I am not able to get for example the time property. How to get that data?

Lelio Faieta
  • 6,457
  • 7
  • 40
  • 74

0 Answers0