0

I have raw data in such format:

 rawdata: [
        {
          id: 1,
          name: "Service Provider",
          hierarchy: ".",
        },
        {
          id: 2,
          name: "Urja",
          hierarchy: ".2.",
        },
        {
          id: 4,
          name: "Test Entity",
          hierarchy: ".2.1.",
        },
        {
          id: 3,
          name: "Entity33",
          hierarchy: ".3",
        },
      ],

How to convert it to a tree structure? It can have unlimited level of hierarchy.

Arnab Maiti
  • 75
  • 1
  • 1
  • 9

0 Answers0