Tiny utility to turn a list into an object