Could you please show how to extract all items for the select input but with indentation?
Something like that:
root
-sub cat
--sub sub cat
Currently, I have recursive function:
function iterate(current) {
if (!current) return;
console.log(current.name);
if (current.hasOwnProperty('children')) {
var children = current.children;
for (var i = 0, len = children.length; i < len; i++) {
iterate(children[i]);
}
}
}
So, needs list of elements which looks like tree (with information about deepness of course)
Hi, thank you for the great plugin!
Could you please show how to extract all items for the select input but with indentation? Something like that: root -sub cat --sub sub cat
Currently, I have recursive function:
So, needs list of elements which looks like tree (with information about deepness of course)