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.