I have an array of items and each item has a day number. There will be multiple items for each day but I want to dynamically construct a table with columns for each day. This is the code I have so far.
<table>
    <thead>
      <th *ngFor="let item of itemList|async">
        Day {{item.assignedPeriod.dayNumber}}
      </th>
    </thead>
  </table>
Obviously this produces a new column for each item regardless of whether a previous item has already been seen for that day. I want it to skip making a new column if the column already exists for the day and create one if it does not exist.
How do I go about that?
 
    