Good day.
I have an API that produces this output:
(4) [{…}, {…}, {…}, {…}]
0:
dueDate: "2018-03-26T00:00:00"
priority: {priorityId: 1, priorityName: "Critical", priorityColor: "red"}
statuses: Array(1)
0:
status: {statusId: 1, statusName: "New", statusColor: "lightblue", ticketStatuses: Array(0)}
In my Angular HTML Template:
<td mat-cell *matCellDef="let row"> {{ row.priority.priorityName }}</td>
Produces: Critical (as one would expect)
But in the following statement that has an additional array:
<td mat-cell *matCellDef="let row"> {{ row.statuses.status.statusName }}</td>
Produce ERROR TypeError: Cannot read property 'statusName' of undefined
I expected a result "New"
Hope someone can help me out here.