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

69
Views
Search all string values on a nested object and return what matches

So I'm trying to do a search function that searches the whole object inside and its values, until now I have this function that searches only first layer of object but not the ones that are inside, and the other problem is that doesn't searches all the item when its with lower/upper case, I want a way to search all 'Books' even if the search is just 'book', here is my js:

const findIn = (arr, query) => {
        return arr.filter((obj) =>
          Object.keys(obj).some((key) => {
            if (typeof obj[key] === 'string') return obj[key].includes(query);
          })
        );
      };
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!