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

182
Vistas
Print out all object values from an Array Inside of a Field on MongoDB (javascript)

I have a database that has different fields of data inside a document and I want to print out one of the objects from the array. I am only able to print out values that have values attached and not Arrays.

I am unable to add photos as I am new but this is what I am working with: Database photo

Code:

 async function listEmail(client) {
    const emailListing = await client
        .db("x")
        .collection("y")
        .find({})
        .forEach(function (i) { 
            console.log(`id = ${i.firstName}, email = ${i.authentications.username}`);
        });
}

I would like to just print out their first name and email (username)

This is my Output.

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