Should `hash` be set to `el` here? If so, you could just make it `{ item: el }` and sort on `item`.