Recently I've encounter a problem, I need to create a html nested list from irregular JavaScript object, and I'm not sure how to proceed with this task. Basically I have JavaScript object which represents folder structure as a tree:
var obj = {
"Canmon01-srv-13": {
"tidata": {
"Comite Paritaire SST": {
"Securite Machine" : {
"01- Development" : {
"path": "Canmon01-srv-13/tidata/Comite Paritaire SST/4_Securite_Machine/01 - Developpement"
}
}
}
}
},
"Cantor-srv-36" : {
"TM1-USAEWD01" : {
"path": "CANTOR01-SRV-36/TM1-USAEWD01"
}
},
"FP&A" : {
"path" : "FP&A"
}
}
Basically what I need to do with this is to create ul with nested li's for each folder (the path should be ommited here).
I would greatly appreciate any help with this one.
Thank you.