ParentFull threadedgarvm·You don't need a function, this is my little trick to convert an array to objectpeopleObj = peopleArr.reduce( (a,x) => (a[x.username]=x, a), {} );View on HN