Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

155
Vistas
How to read/retrieve data from firebase using get() method

I have a list of candidates that I want to read from firebase, but I cannot read when using the method get(). I can read using snapshotChanges() and valueChanges().

My service I have:

  getCandidatesForTest(id: string) {
    return this.aFireStore.collection("candidateResults", query => query.where("test.id", "==", id)).snapshotChanges();
  }

to read the data I do:

this.candidateServ.getCandidatesForTest(this.testId).pipe(untilDestroyed(this)).subscribe  ((data) => {
      this.candidates = data.map(e => {
        return {
          id: e.payload.doc['id'],
          lastname: e.payload.doc.data()['lastname'],
          firstname: e.payload.doc.data()['firstname'],
          ...
        }
  })
 })

I would like to read from this function:

  getCandidatesForTest(id: string) {
    return this.aFireStore.collection("candidateResults", query => query.where("test.id", "==", id)).get();
  }

But I cannot retrieve the values of it.

Any help is much appreciated.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda