DenQ / list-to-tree

Convert list to tree
BSD 3-Clause "New" or "Revised" License
87 stars 30 forks source link

For example. Check data from issue #9 #10

Open DenQ opened 7 years ago

DenQ commented 7 years ago

Cheking data from issue https://github.com/DenQ/list-to-tree/issues/9:

[{ "id" : 6000, "parent" : 0 },
{ "id" : 6001, "parent" : 6000 },
{ "id" : 6002, "parent" : 6000 },
{ "id" : 6003, "parent" : 6000 },
{ "id" : 6004, "parent" : 6000 },
{ "id" : 6005, "parent" : 6000 },,
{ "id" : 6006, "parent" : 6000 },
{ "id" : 6007, "parent" : 6000 },
{ "id" : 6008, "parent" : 6001 }]