Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

72
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!