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

82
Views
Intentando usar equalTo en la consulta de base de datos en tiempo real de Firebase

Tengo el siguiente nodo:

 attendanceOptions: { uid1: 'blah@example.com', uid2: 'tap@example.com' }

Estoy tratando de devolver solo la clave y el valor donde el valor es igual. Estos son mis dos intentos.

 const getMinistry = await admin.database().ref(`organization/${req.orgId}/attendanceOptions`) getMinistry .equalTo(req.memberUid) .once('value', snapshot => { functions.logger.log(snapshot.val()) });

Esto devuelve nulo También probé:

 const getMinistry = await admin.database().ref(`organization/${req.orgId}`) getMinistry .orderByChild('attendanceOptions') .equalTo(req.memberUid) .once('value', snapshot => { const data = snapshot.val(); functions.logger.log( `this is data: ${data}` ) return data; });

El registro es this is data: null

En mis reglas tengo:

 "attendanceOptions": { ".indexOn": [".value"] },

¿Qué estoy haciendo mal aquí?

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

0

La sintaxis correcta es:

 getMinistry .child('attendanceOptions') .orderByValue() .equalTo(req.memberUid)
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!