I have passed array of objects which inside having array of objects to dataSource in mat table. I am unable to loop through the object which has array of objects.
const roleListData = [
{
roleId: 1,
role: "admin",
description: "Testing",
level: "1",
roleFunctions: [
{
createdBy: "person-1",
createdOn: "2019-11-04T20:02:52.345",
updatedBy: null,
updatedOn: null,
segmentId: 2,
segmentType: "Dealer",
segmentName: "testing",
segmentValue: "5",
additionalInfo: null,
active: true
}
]
}
]
Table cell for roleFunctions:
<ng-container matColumnDef="roleFunctions">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Functions</th>
<td mat-cell *matCellDef="let row">
{{ item }}
</td>
</ng-container>
I need to get access to roleFunction object which intern have array of objects. if that array does not have any objects then also it should work fine without any issues. because as per my requirement that object may or may not contain array of objects. if they are present then i should be able to display inside object information in that table cel.