i have a problem in converting my array to tree list array in angular. here is my array. please help me to convert it to proper format of tree view list.
a = [ { directory: "p1/p2", directoryId: "164", name: "aaaa" } { directory: "s1/s2/s3", directoryId: "168", name: "nnnn" }, { directory: "h1/h2", directoryId: "170", name: "ffff" }, { directory: "h1/h2", directoryId: "170", name: "mmmm" }, { directory: "h1/h2", directoryId: "170", name: "bbbb" } ]
i want to convert this array to the image that i have attached.enter image description here