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

98
Views
method map() - getting from backend array all object values at once

Im downloading with axios a backend structure data.

I have something like this: advancedProfile.technologies (array with 5 objects)with keys {title, link, category, date, id}).

and then im rendering a divs with use of map.

The code line is like this :

{download.data.advancedProfile.technologies.map(obj=><div>{obj.title}</div>)}

With this line I can render all 5 objects from array, but only with one key value.

I am absent-minded, but how i can just map and get all 5 objects with all keys at once ? I dont want to copy and paste all key values separetely.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you only need values:

{download.data.advancedProfile.technologies.map(obj => (
  <div>
    {Object.values(obj).map(value => <div>{value}</div>)
  </div>
))}

If you need keys and values:

{download.data.advancedProfile.technologies.map(obj => (
  <div>
    {Object.entries(obj).map(([key, value])=> <div>{key}: {value}</div>)
  </div>
))}
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!