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

133
Views
Find a list of properties with duplicate array on the same object with Lodash

I have an object that has an unknown number of properties, the values of which are non-empty arrays e.g.

const obj = {
  c1: ['a', 'b', 'c'],
  c2: ['a', 'c', 'b'],
  cx: ['a', 'b'],
  c3: ['d'],
  c4: ['d'],
  c5: ['e'],
  ...
}

I'm looking to find any duplicate properties, where the order of the array items isn't considered, and the result would let me know which properties match e.g. [c1,c2], [c3, c4]

I can probably use a combination of Object.entries, nested forEach, sort the arrays before comparing.... but was thinking there may be some more concise approach with lodash that I haven't considered

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!