JSFiddle - React, Tailwind, and code Playground
JavaScript
var obj = {
"forecast": {
"txt_forecast": {
"date": "7:52 AM MDT",
"forecastday": [{
"period": 0,
"icon": "partlycloudy",
"icon_url": "http://icons.wxug.com/i/c/k/partlycloudy.gif",
"title": "Thursday",
"fcttext": "Partly cloudy. High near 90F. Winds W at 10 to 15 mph.",
"fcttext_metric": "Sunshine and clouds mixed. High 32C. Winds W at 15 to 25 kph.",
"pop": "10"
}, {
"period": 1,
"icon": "nt_partlycloudy",
"icon_url": "http://icons.wxug.com/i/c/k/nt_partlycloudy.gif",
"title": "Thursday Night",
"fcttext": "Partly cloudy skies. Low 71F. Winds SSE at 5 to 10 mph.",
"fcttext_metric": "Partly cloudy. Low 22C. Winds SSE at 10 to 15 kph.",
"pop": "0"
}]
}
}
}
console.log(obj.forecast.txt_forecast.forecastday[0].title);