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

156
Views
How can i take object from array which contain one element and it's and object?

enter image description here

this's my result of next function :

 db.collection('SOCIAL').get().then((snapshot) =>{
        snapshot.docs.forEach(doc => {
            dataNet.push(doc.data())
        })
        return dataNet
    })

i need to have these values as a temps, but i can't do these

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

0

If by temps you mean that they are only "inside" your callback - then you can do something like this:

  const snapshot = await db.collection('SOCIAL').get();
  let dataNet = [];

  snapshot.docs.forEach(doc => {
    dataNet.push(doc.data())
  })

 // dataNet[0] is your object

Please note that you need to wrap this in an async function.

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!