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

192
Views
How to iterate an array with key in nested array in javascript

i have an array structure like below, which has combinedPorts as key with nested array. i can able to iterate and display the properties with .map function in ES6 if know the number of combinedPorts appears, but i need the code to be common if i have N number of combinedPorts as well.

[
    
    {
        "name": "Test Source",
        "combinedPorts": [
            {
                "name": "PortGroup_1",
                "type": "SourcePorts",
                "combinedPorts": [
                    {
                        "name": "Source_1",
                        "type": "SourcePorts",
                        "combinedPorts": [
                            {
                                "name": "Sami_TestSource",
                                "type": "SourcePorts"
                            }
                            
                        ]
                        
                    }
                ]
            }  
            
        ]
        
    }
]

can someone guide me achieve this. Thanks in advance.

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!