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

146
Views
Get name of an objetc while looping an array

So i have this:

const somObj = {
    whatever : 1,
}

const somObj2 = {
    whatever : 2,
}

const arrayOfObj = [somObj, somObj2]

Is there any way to get the name of the objects as strings while looping for the array like this?

for (i in arrayOfObj){
    something(arrayOfObj[i])
}

being the return the string "somObj".

thank you

about 4 years ago · Juan Pablo Isaza
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!