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

227
Views
how to query an array of objects in a document firestore? i want to get an object with specific id init

i have a collection of users and document contain array of objects, array name is employee i want to filter employee on a given id which is present inside every object

const citiesRef = collection(db, 'user');

  const q = query(citiesRef, where('user', 'array-contains', {id: '34445'}));

  const querySnapshot = await getDocs(q);
 
  querySnapshot.forEach((doc) => {
    console.log(doc.id, ' => ', doc.data());
about 4 years ago · Juan Pablo Isaza
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!