【发布时间】:2019-08-09 21:08:38
【问题描述】:
我有以下 JSON 结构:
{
"daypart": [
{
"dayOrNight": [
null,
"N",
"D",
"N",
"D",
"N",
"D",
"N",
"D",
"N",
"D",
"N"
]
}
]
}
我想要做的是到达 narrative 内的键数组。但是每当我尝试获取这些密钥时,我都会得到预测 undefined 或预测 [object Object]
代码
async forcast(){
this.http.get("xxxxxxxxxxxxxxx")
.subscribe(data => {
let f = data
this.dforecast = f["daypart"]["narrative"]
console.log("forecast "+ this.dforecast )
})
}
【问题讨论】:
-
“叙事”从何而来?不是“白天或黑夜”吗?
-
抱歉更新了