Sort a Dictionary

Dictionaries do not have any real order & so attempting to use table.sort by itself probably holds no promise. You will definitely need to do a little extra work like you’ve been trying to.

For sorting of dictionaries I have always used this method that 1waffle1 goes into detail about here:

I see no reason this could not work for your use-case because the sorted variant will still hold the indexes thus making it easy to reattach “OtherStuff” on a per index basis after sorting.

1 Like