sort objects by some (calculated) key
