[javascript] lodash: mapping array to object