Hi!
I have a list of lists. Each one of the sub-lists has two elements. The first one is also a list that shows a hierarchy, and the second is a name. p.e.
(((1) "OneName") ((0 1) "Xampl") ((0 0 1) "Subname") ((1 0 1) "SpainIsDifferent") ((1 1) "AAI") ((0 1 1) "yVivaSanFermín") ((1 1 1) "VivaElVinoDeRioja"))
This list represents a tree like this:
1.-"OneName"
1.0.- "Xampl"
1.0.0.- "Subname"
1.0.1.- "SpainIsDifferent"
1.1.- "AAI"
1.1.0.- "YVivaSanFermín"
1.1.1.- "VivaElVinoDeRioja"
I want to sort the list alphabetically but keeping the hierachy, so the tree should remain like this:
1.-"OneName"
1.0.- "AAI"
1.0.0.- "VivaElVinoDeRioja"
1.0.1.- "YVivaSanFermín"
1.1.- "Xampl"
1.1.0.- "SpainIsDifferent"
1.1.1.- "Subname"
I'm a bit thick today, and I can't find a solution (nor explain it better...
).
Would anybody help me, please?