2
Good evening, I own the following tree defined by JSON:
[
{
"roleName":"CCA",
"children":[
{
"roleName":"Data_Final_Índices_CCA",
"$$hashKey":"object:2183",
"children":[
{
"roleName":"Datas_Índices_CCA",
"$$hashKey":"object:2192"
}
],
"collapsed":true
},
{
"roleName":"Data_Inicial_Índices_CCA",
"$$hashKey":"object:2184",
"children":[
{
"roleName":"Datas_Índices_CCA",
"$$hashKey":"object:2195"
}
],
"collapsed":true
},
{
"roleName":"IGPM",
"$$hashKey":"object:2185"
}
],
"$$hashKey":"object:2179",
"collapsed":true
}
]
Each "father" knot can have n children and all children can have other children.
I need to set the value "false" on all nodes with the property "collapsed", for this I need to go through all nodes, how can I do this using some Javascript function? The tree has no fixed knot size and quantity.
Edit the question and ask a [mcve] with your attempt to address the problem. Attach the error messages and try to highlight in which line you think the code is giving error.
– Augusto Vasques