how to improve this function that converts a flat array into a tree?

后端 未结 0 1659
误落风尘
误落风尘 2021-01-27 04:06

I have this function that converts a flat array to a tree based on a path property.

This is my data :

  const input = [
    {"name":&quo         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题