I'm using firebase and angular11. I try to get all those documents where sme_id is null or match with the id which we passed inside the query.
I have tried something like this but it gives me an empty array.
get_active_chat(id) {
return this.firebase_store
.collection('chat', (ref) => ref.where('sme_id', 'in', [null, id]))
.snapshotChanges();
}
get_all_student_chat() {
this.spinner = true;
this.chat_service.get_active_chat(localStorage.getItem('uid')).subscribe(
(res) => {
const data = FormativeData.formative_snapshot_data(res);
console.log(data);
this.spinner = false;
},
(error) => console.log(error)
);
}
How can I perform OR query?