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

217
Views
Sumar elementos Firebase Realtime React

Tengo grandes dificultades para realizar una acción con datos en tiempo real de firebase.

tengo esta estructura:

 -contacts --id ---name ---status ---valor

Por ejemplo:

por ejemplo

Estoy tratando de SUMAR todos los registros con el estado "RECEITA", con este código:

 const filterStatus = () => { fireDb.child("contacts").orderByChild("status").equalTo("Receita").on("value", (snapshot) => { if(snapshot.val()) { var sum = 0; Object.keys(data).map((id, index) => { sum += parseInt(data[id].valor); console.log(sum) }) } } ) }

pero no devuelve nada, ni siquiera en console.log

¿Cómo puedo hacer esta suma correctamente?

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!