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

75
Vistas
Displaying data from a JSON object

I am making a Node.js & Express app that gets records from a CRM. I'm trying to show the data on a html page by sending the data with:

    app.get('/user', (req, res) => {
    let stringify = JSON.stringify(responseObject);
    res.send(stringify);
    });

The response I get is:

{
    data: [
        {
            keyValues: {},
            keyModified: {}
        }
    ],
    info: {
        perPage: 200,
        count: 1,
        page: 1,
        moreRecords: false,
        keyModified: { }
    },
    keyModified: { }
}

I want to display only the data within the "keyValues" object, which contains the data of the user I'm searching for. How can I make this happen?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You have to extract from responseObject only the informations that you want to send. Since data is an array you can map on it and select only the keyModified attribute. Something like this:

app.get('/user', (req, res) => {
  res.json(responseObject.data.map(d => d.keyModified))
});

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