Transform the array of objects (years) into an object.

From:
years: [
  { _id: 2010, occ: 676 },
  { _id: 2012, occ: 672 },
  { _id: 2009, occ: 614 },
  { _id: 2011, occ: 570 }
]

to:
years: {
  2009: 614,
  2010: 676,
  2011: 570,
  2012: 672
}