I am implementing multi level datatable without using any plugin or library. I want to implement based on javaScript, JQuery or angular js. I checked one below links,
Traverse all the Nodes of a JSON Object Tree with JavaScript
nested table using ng-repeat
But my json structure is different from above link.
I need to display my JSON in Tree Structure UI. I don't hard code level in html. All level should be handle by javascript.
I have implemented jsfiddle: http://jsfiddle.net/varunPes/0n9fmawb/40/
JSON STRUCTURE
[ {
Home:{
"checkbox_view":true,
"checkbox_edit":false,
"checkbox_delete":true
}
},
{
"watchColorWorld":{
"local":{
"app-local-black":{
"checkbox_view":true,
"checkbox_edit":true,
"checkbox_delete":true
}
},
"global":{
"app-global-red":{
"checkbox_view":true,
"checkbox_edit":true,
"checkbox_delete":true
}
},
"world":{
"app-world-green":{
"checkbox_view":true,
"checkbox_edit":true,
"checkbox_delete":true
}
}
}
},
{
"systemMgmt":{
"checkbox_view":true,
"checkbox_edit":true,
"checkbox_delete":true
}
},
{
"rules":{
"Rule1":{
"rule2":{
"rule3":{
"checkbox_view":true,
"checkbox_edit":true,
"checkbox_delete":true
}
}
}
}
}
]
Expacted Output
You answer valuable for me. Thanks in advance.