title: Return object from reduce [Angular]
body: <p>i want return a list of object with reduce function.
  I want a list of object like :</p>
  <pre><code>[{project: nameProj, hours: numProj}, {project: nameProj, hours: numProj},{project: nameProj, hours: numProj}]
  </code></pre>
  <p>Actually i return only a object where key is name of project and value is hours:</p>
  <pre><code>{
  Name1: 9,
  Name2: 10,
  Name3: 30,
  }
  </code></pre>
  <p>How i can return list of object from reduce function?</p>
  <p>My actual code is:</p>
  <pre><code>
  this.activities$
          .pipe(map((e) =&gt; e.map((e) =&gt; e)))
          .subscribe((e) =&gt; (this.dati = e));
        this.aggregated = this.dati.reduce((acc: DataTable[], activity) =&gt; {
          const projectName = `${activity.project?.customer.name} - ${activity.project?.name}`;
  
          acc[projectName] = (acc[projectName] ?? 0) + activity.hours;
          return acc
          });
        }, {});
  
  </code></pre>