I have following JSON struncture:
{
"daypart": [
{
"dayOrNight": [
null,
"N",
"D",
"N",
"D",
"N",
"D",
"N",
"D",
"N",
"D",
"N"
]
}
]
}
What i want to do is reach keys array inside narrative
. But whenever I try to get those keys l get forecast undefined
or forecast [object Object]
Code
async forcast(){
this.http.get("xxxxxxxxxxxxxxx")
.subscribe(data => {
let f = data
this.dforecast = f["daypart"]["narrative"]
console.log("forecast "+ this.dforecast )
})
}