Currently, I am utilizing RXJS operators in combination with the firebase observable (specifically distinct and filter). If you would like to see my firebase tree, you can access it here. Below is an excerpt of my code:
let places this.db.list(`users/${this.authProvider.getUID()}/visitedPlaces`,{
query:{
orderByChild:"googleId"
}
});
places.distinct((p)=>{
console.log(p)
return p.googleId;
}).
subscribe((snap)=>{
console.log(JSON.stringify(snap,null,2))
},(err)=>{
console.log(JSON.stringify(err,null,2))
},()=>{
console.log("completed");
});
I am attempting to filter the firebase data based on googleId. Although no errors are being generated, the distinct list is not functioning as expected.
If anyone has any insights or suggestions for why this may be happening, I would greatly appreciate it. Thank you.