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

161
Views
How can I access the first property of a nested property?

enter image description here

Every pages property has a first property with a random name. How can I access this property?

I thought about pages[0] but it's not an array.

I'm dealing with an API.

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

0

Use Object.values() to convert the object to an array, then get the first value.

Object.values(pages)[0]
about 4 years ago · Juan Pablo Isaza Report

0

As long as there is only one nested object, you can use this to get the driver object.

pages[Object.keys(pages)[0]]
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!