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

204
Views
Fetching specific data from firebase array

so I have this collection:

I am trying to only get the groupID's in the array there are like 3 of them, but I tried a for loop in a for loop but it keeps returning undefined. Where am I going wrong?

fire.firestore().collection('userEvents2').doc(fire.auth().currentUser.uid).set({
    groups: groupsList
})


for (let i = 0; i < groupsList.length; i++) {
    const key = "";
    for (key in groupsList[i]) {
        console.log(key.groupID)
      }
    
  }
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Perhaps the loop is trying to run before groupList is resolved?

Is that the complete code? Are you storing groupList in a variable like let groupList = groups.groupList; ?

about 4 years ago · Santiago Trujillo 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!