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

240
Views
Node.js - Generic Object Injection Sink (on eslint) using FOR iteration

I have a node project and a function to find a specific object item

My code:

const filterObjectItem = (myObject, property, value) => {
    for (const prop in myObject) {
        if (prop === property) {
            for (const item in myObject[prop]) {
                if (item === value) {
                    return myObject[prop][item][0]
                }
            }
        }
    }

    return false
}

the function workingl, but I'm getting this warning when running the eslint

warning  Generic Object Injection Sink  security/detect-object-injection

does anyone have an idea how to refactor the function to solve this warnning?

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!