Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
firestore - retrieve data by filtering arrayField

I am storing data in firestore in the format

feed: { userID, title, description, ..., hideFor[userID] }

I want to query feeds such that loggedin user should not see the feed if his/her id is listed in hideFor[] array. Which firestore query method/operator can help me in this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You want to use the in operator https://firebase.google.com/docs/firestore/query-data/queries#in_and_array-contains-any

If you use angular/fire then it would be something along like

this.afs.collection('feed', q=> { return  q.where( userId, 'in','hideFor'})

edit: realized you wanted not in then the operator is not-in but same pattern

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!