I am using firestore to store my data and I want to fetch a collection of users from my db except one (Current User). How can I do this.
This is the image of my db
Here I want to fetch all users except the one with id 'gi3oGztVrKQoiEHxFv28TAQpxah2'
The code I am currently using is
this.donorCollection = this.fireStore.collection<any>('users').valueChanges();
console.log(this.donorCollection);
this.donorCollection.subscribe(data => console.log(data) );
Which returns all users. The reason for this specific task is that my current user always updates his/her db whenever his/her position changes. Therefore if I applied valuechanges()
to the current collection it will always give new value as current user is updating his/her postion.