P
pietanczyk
I have the following array:
var arrTreeLeaves = ['Root', ['1', ['1.1', '1.2', '1.3']],
['2', ['2.1', '2.2', '2.3']],
['3', ['3.1', '3.2', '3.3']]];
I would like to get the following tree structure:
Root
1
1.1
1.2
1.3
2
2.1
2.2
2.3
3
3.1
3.2
3.3
Could someone help me and write a recursive function which would do that?
var arrTreeLeaves = ['Root', ['1', ['1.1', '1.2', '1.3']],
['2', ['2.1', '2.2', '2.3']],
['3', ['3.1', '3.2', '3.3']]];
I would like to get the following tree structure:
Root
1
1.1
1.2
1.3
2
2.1
2.2
2.3
3
3.1
3.2
3.3
Could someone help me and write a recursive function which would do that?