Objectify.js - turns array into object and organizes