DHTMLX Tree : Get the checked item in certain order


I want the checked items in order of “from-Parent-to-Child” node.

I used : getAllCheckedBranches(), getAllChecked(), getAllPartiallyChecked(); but not working it gives from child to parent.

How to get it ?

Actually the
returns checked items in hierarchical order - parents before child items.

In any case you can just reverse list as
    var list = list.split(",").reverse().join(",")