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

247
Views
How to set dynamically array object to the for loop in javascript when for loop iterates

I need to set my for loop length dynamically.

I have an object array.enter image description here

After my condition is true, I need to set dynamically objects in my permission array inside for loop.

Heare is my code:

if (obj[k]===pathData[i]){
         //pathData[i]=order
        for (let l = 0; l <permission[j].pathData[i].statusChange.length; l+=1) {
              
             } 
          }

My code is not working...I really need your help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

var permissionObjKeys = Object.keys(permissions[j])
         for(permissionObjKey of permissionObjKeys){
            permissions[j][permissionObjKey].statusChange.push('new-permission')
         } 

try this it will work inside the dynamic object present in the permission array.

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!