you need a struct

Code:
struct mytreeitem 
  string myvalue
  mytreeitem[] children
end_struct
then start out with an array of these

the first array holds the root nodes and then each node has an array for its children