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

233
Views
How to get object keys which have common value in javascript?

I've a problem getting object keys by value for example:

issues: {
  window_expired: 'Yes',
  no_power: 'No',
  no_display: 'Yes'
}

I want to get object keys which have 'Yes' Value as: window_expired, no_display

I've tried this method which is working but it's returning the 1st key i want to loop through and get the keys by value:

function getKeyByValue(object, value) {
  return Object.keys(object).find((key) => object[key] === value);
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

you should use filter in your case.

Object.keys(issues).filter(e => issues[e] === 'Yes')

Have a good day

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!