Wish [B4X] B4XOrderedMap, sort by values

swChef

Active Member
Licensed User
Longtime User
B4XOrderedMap has sort by keys [.Keys.sort].
I'm writing to request sort by values [.Values.sort].
 

swChef

Active Member
Licensed User
Longtime User
In this case the Values are frequency bins for some recurring text values, so not unique.

I used a custom Type KeyValue (Key as string, Value as int) as a workaround, using an extra orderedmap, sorted those Keys.SortType("Value",False), then loaded another orderedmap from the sorted map's Keys. The source data was in an orderedmap.
 
Last edited:
Top