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

144
Views
Map through array that includes object

Below is the response coming back. I'm trying to map through the logo object so that I can grab the url, however my implementation on Object.keys is not working. What am I doing wrong?

[
  {
    "title": "Header",
    "logo": {
      "metadata": {},
      "sys": {},
      "fields": {
        "title": "Logo",
        "file": {
          "url": "xxxxxx",
          "details": {},
          "fileName": "logo.png",
          "contentType": "image/png"
        }
      }
    },
    "links": []
  }
]

{Object.keys(header.logo.fields.file).map((logo) => (
    <p>{logo.url}</p>
))}

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

0

Assuming the top-level array name is header, just do this. Note that the top-level structure is an array, so you need an index to get the object inside.

<p>{header[0].logo.fields.file.url}</p>
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!