I amb having a problem trying to get information from one document inside the other document, the one I need because it has the property Id.
On the following img, I can access to my diets collection and get my specific document, but then I am not able to 'come back' and get my info ID:
Then, my structure of users is the following:
Once I exposed my problem, I'll show you the code where I am not able to continue:
commentsDietC: AngularFirestoreDocument<any>;
commentsDiet : Observable<any>;
this.commentsDietC = db.doc<any>('diets/'+this.diet.idDiet);
this.commentsDiet = this.commentsDietC.snapshotChanges()
.map(actions => {
if(actions.payload.data()){
if(actions.payload.data().hasOwnProperty('commentsDiet')){
/*HERE is where I should try to get the displayName and PhotoUrl from
the other document*/
return actions.payload.data().commentsDiet;
}
}
});
Any help would be really appreciated it.