I am searching for a simple algorithm / javascript implementation for the following problem:
I have an object with the following structure:
preference