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

64
Views
firestore returns promise instead of giving a value

for some reason Firebase is returning promise instead of value

let customer123 = db.collection('CustomerDatabase').get().then((snapshot) => {
    snapshot.forEach((doc) => {
        if(businessNameValue === doc.data().BusinessName){
            let customerID = doc.data().CustomerID;
            console.log(customerID) // this is fine, i am able to ge the value.
            return customerID
        }
    })
})

console.log(customer123) //but this is giving me promise
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!