Array sort

hi,

i have this array when traced in flash looking like this;

ID - NAME - BOO - BOO - SUB ID

1,NO,false,false,0
2,OM BRASSWIND,true,false,1
3,PROGRAM,true,false,1
4,EN,false,false,0
5,ABOUT BRASSWIND,true,false,4
6,PROGRAM,false,true,4
7,Saturday,false,true,6
8,Lørdag,false,true,3

What i’m trying to do is to sort after the SUB ID so the parent section comes at top and the childs follows underneath.

Any ideas of how this is done?

Next i want to attach different moviclips to the parent, child and childs child section.

great if someone could help…
tanx.