Display Object name from Array of Array in Angular

Issue

I’m confused on how would i display the categories.name in array of object. I want to display in the first td.

enter image description here

<tr *ngFor="let innerItem of project.project_services">
    HERE--> <td>{{ innerItem.categories.[name]}</td>
    <td>{{innerItem.service.sku}}</td>
    <td>{{innerItem.service.name}}</td>
</tr>

Solution

<tr *ngFor="let innerItem of project.project_services">
    <td *ngFor="let categoryItem of innerItem.categories">{{categoryItem.name}</td>
    <td>{{innerItem.service.sku}}</td>
    <td>{{innerItem.service.name}}</td>
</tr>

Answered By – AddWeb Solution Pvt Ltd

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.