Here is the structure of my firebase database:
I am trying to retrieve a list of names only to send it via email by clicking a button.
The code I have so far:
toemail(){
this.db.list('profiles').snapshotChanges().subscribe(
res => {
res.forEach(doc => {
this.people.push(doc.payload.val());
});
});
console.log(this.people);
}
This code adds all data (email, game, name) to the people list. How could I modify it to add only names of people who has game=1 to people list?
Thank you
