I have the following empty array declared:
myYears: { year: number, checked: boolean }[] = [];
My goal is to fill this array of objects with a year and a boolean on whether or not that year is checked. I like having the property names here as well. When initially populating myYears, I fill it like below to obtain my list of unique years from myBigDataList object array. This is successful in giving me an array of unique year numbers, and I've gotten this far. Now what's the best way to turn this into an array of {year: number, checked: boolean} objects instead of just numbers, and where everything is initialized to true?
this.myYears= Array.from(new Set(this.myBigDataList.map(item => {item.activityYear})));