Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

161
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda