I need to retrieve data from below given firebase db:
Following is my TS code to retrieve the data:
ionViewDidLoad(){
this.customerId = this.navParams.get('data');
this.customerProvider.getData(this.customerId).snapshotChanges().subscribe(x =>{
this.listOne = x
this.listOne.forEach(y =>{
this.listTwo = this.customerProvider.getListDetails(this.customerId, y.key).snapshotChanges()
console.log(this.listTwo)
})
})
}
Following is the HTML:
<ion-item>
{{(listTwo | async)?.key}}
</ion-item>
The problem is the list shows only 1 item whereas the firebase db has 3 items with key. Following is the console screenshot
Following is the output
Following are the providers:
getFile(customerId){
return this.afDb.list(`response/${customerId}`)
}
getFileDetails(customerId, listOne): AngularFireObject<any>{
return this.afDb.object(`response/${customerId}/${listOne}`)
}
Seeems like forEach or AngularFire Object issue but not sure.



mlthere iscustomerIdnode there are 3 child, each child has several child elements, each of which further hasnameandscorechild elements. listOne is the array 3 child which is used to obtain the keys. key is inserted to get the angularfire object details. Pls feel free to ask for more clarification - Disu