I have following JSON struncture:
{
"vt1hourlyForecast": {
"processTime": [
"2019-08-23T13:00:00+0300",
"2019-08-23T14:00:00+0300",
"2019-08-23T15:00:00+0300"
],
"temperature": [
43,
44,
44
],
"icon": [
34,
34,
32
]
}
}
l am try to get those arrays above from vt1hourlyForecast object using NgFor , but l get error
error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
html
<ion-item *ngFor="let item of hourly">
<div style="direction: rtl;margin-inline-end: auto;">
<div>{{item.vt1hourlyForecast.processTime | date:'h:mm a'}}</div>
<div>
{{item.vt1hourlyForecast.phrase}} ,
درجة الحرارة : °{{item.vt1hourlyForecast.temperature}}
</div>
</div>
<ion-thumbnail slot="end">
<img src="assets/icon/{{item.vt1hourlyForecast.icon}}.png">
</ion-thumbnail>
</ion-item>
Code
this.http.get("xxxxxxxxx")
.subscribe(data => {
this.hourly = data
console.log("forecast " + this.hourly)
})
There is any way to get those arrays using NgFor please ?