I return a list of data from my db and want to use it to create a tree view. The data i have is in this format
District 1 Section 1 Area 1 Pool 1
District 1 Section 1 Area 1 Pool 2
District 1 Section 1 Area 1 Pool 3
District 1 Section 1 Area 2 Pool 4
District 1 Section 1 Area 2 Pool 5
District 1 Section 2 Area 3 Pool 6
District 1 Section 2 Area 3 Pool 7
District 1 Section 2 Area 4 Pool 8
District 2 Section 3 Area 5 Pool 9
District 2 Section 4 Area 5 Pool 10
etc. (i.e every pool belongs to an area, every area to a section and every section to a district)
What is the best way to use the data as a tree view? I have both a name and an id for each district, section area and pool.
cheers