I know I shouldn't necro, but I've looked at the FAQ, done quite a lot of searching and I'm having exactly this problem and want to do exactly the same thing.
Another way round it would be if I could access the name of the key by value (copy values to array, sort, then get keys by iterating back through the array), which also seems impossible.
Any ideas? I'm using C3 if that makes a difference (which I would imagine it doesn't).