@Jashka wrote:
Why node not related to another node, but iterable in findTreeChildrenNodes
node a, related to c node and d, but not to b
console log
end node Finish Start : a : c : e : g : Finish
end node Finish Start : a : c : d : f : Finish
end node Finish Start : a : b : e : g : Finish >>> ( b not related to a )code to itarable ( function setLevel )
`while (nodes.next()) { const node = nodes.value; const childs = node.findTreeChildrenNodes(); if (childs.count) { parentNode = node; nodePath = nodePath + ' : ' + node.data.text; setLevel(childs, nodePath, parentNode) } else { console.log('end node', node.data.text, nodePath + ' : ' + node.data.text); } }
`
Why after node
a
next nodeb
, its due to nesting by node level ?
How to do it right, how I want it
Posts: 2
Participants: 2