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

337
Visualizações
how to fetch subcollection's data in firestore

I am trying to fetch a collection' data called highlights that has a doc and another collection , I want to retrieve only the data : enter image description here enter image description here enter image description here

  const fetchHighlight =async()=>{

    const HighlightDbId =  await db.collection('highlights').doc('2SCS2S0JnzngWEiYkHNk')
.collection('hBYWvZ3KN3NLLrucTpryeTQZnHz2').get()
    console.log(HighlightDbId)

    }
React.useEffect(()=>
    {
      fetchHighlight ()
     
    }, [])

How can I retrieve this collection's data (tag,teamColor, team ...) This is what I get when i console log : enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There are good hands on examples for all the basic cases such as this one. In your code, you get the snapshot of the collection query right, but you need to iterate docs on in snapshot object.

Look for more in here: https://firebase.google.com/docs/firestore/query-data/get-data#get_multiple_documents_from_a_collection.

about 4 years ago · Juan Pablo Isaza Relatório
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