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

167
Vistas
Updating a grandchild array in Firebase

Using Firebase Firestore, I have a data structure that looks like this:

rooms{ 
    room1 {
         datum : string
         people { 
               person1 {
                      name : string
                      aliases {
                             x : string

A root collection, rooms

A child doc, room1

A grand-child collection, people,

A grand-child doc, person1

A great-grandchild collection, aliases

I'm using Angular and Firebase for my app. I'm trying to update the grandchild collection, aliases. The first step I'm taking is to access that collection; this is what I've tried so far:

people = this.firestore
      .collection("rooms")
      .doc("room1")
      .collection("people").snapshotChanges();
people.subscribe(item =>{
      console.log(item)
})


The issue is, nothing is ever returned. I know it's not due to waiting for the subscription because I put the subscribe / console.log component in a button, put the snapshot changes component in ngOnInit, and still got nothing regardless of how long I waited.

Technically, the 'people' collection is an array inside the room1 doc, not necessarily a sub-collection. How do I properly access grandchild data structures with firebase?

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