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

126
Views
Issues creating a new JSON object in Node.js

Sorry I am new to programming, could anyone help with this please. I can log the profile object, a JSON object with 10 items, but I cant log the vehQ, which should contain only 3. Have I written this incorrectly?

        let profile = await this.getProfileDetails(params)
        console.log(profile)
            var vehQ = {}
            if (profile ) {

                vehQ["profileID"] = profile[0].profileID
                vehQ["regNumber"] = profile[0].regNumber
                vehQ["compatibility"] = profile[0].compatibility
                console.log(vehQ)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You're probably receiving the JSON as string, you need to parse it to JS object.

const parsedProfile = JSON.parse(profile);
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!