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

130
Views
How to filter an array of objects by another object?

Like i have an array of objects:

const arr = [
{name: 'Adam', age: 23},
{name: 'Steve', age: 23},
{name: 'Eve', age: 30}
];

And i have another object

let obj = {age: 23}

How can I filter an array so it will be contain just:

 [
    {name: 'Adam', age: 23},
    {name: 'Steve', age: 23},
 ];
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

let newArray = arr.filter(a => a.age == obj.age);
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!