Я получил этот многомерный массив из поиска в firestore.
getschedule(){
this.ScheduleDocument = this.usuariosser.getspecificschedule(this.id,this.id_horario);
this.ScheduleObservable = this.ScheduleDocument.valueChanges();
let that=this;
this.ScheduleDocument.snapshotChanges().subscribe(
function(res){
if(that.horario.length==0){
that.horario=res.payload.data().horario;
console.log(that.horario);
}
else{
that.horario=[];
that.horario=res.payload.data().horario;
}
}
);}}
Когда я печатаю «That.horario», результат похож на:
Как я могу напечатать в списке ионов дни и часы в днях соответственно в html ?, это мой код html.
<ion-card *ngFor="let item of horario ; let i=index">
<ion-list >
<ion-item>
<ion-label>{{item.dia}}</ion-label>
</ion-item>
<ion-item *ngFor="let items of item.horas">
<ion-label>{{items.horas}}</ion-label>
</ion-item>
</ion-list>
</ion-card>
Спасибо за вашу помощь.