I have this python dictionary that contains inside some nested objects:
Input
{
"data": [
{
"name": "default",
"type": "pkg"
},
{
"name": "name1",
"subobj": [
{
"name": "subname1",
"subobj": [
{
"name": "sub-subname1",
"type": "pkg"
},
{
"name": "sub-subname2",
"type": "pkg"
}
],
"type": "folder"
}
],
"type": "folder"
}
]
}
I need to recursively create a list that concatenates the "name" keys (maintaining the hierarchy) like the following:
Output
default
name1/subname1/sub-subname1
name1/subname1/sub-subname2
How Could I achieve this Output taking in consideration that could be there infinite nested object in subobj ?