I am trying to loop the nested assignee object in my Angular template. 1st code block is the JSON snippet of the nested object(assignee). 2nd code block is the template of my Angular workspace where I want to display the nested object assignee.
**JSON SNIPPET**
{
"ticket": 12,
"title": "Ticket#2",
"description": "Ticket#2",
"severity": "Normal",
"status": "New",
"assignee": {
"id": 26,
"employeeNumber": 101,
"firstName": "Amy",
"middleName": "Devie",
"lastName": "Iliya",
"department": "HR"
},
"watchers": [],
"empNum": null
},
<p *ngFor="let ticket of tickets">
</p>
The result of this is when I run it is always [object Object] . Also, how I access only the Id in the assignee object?
Aucun commentaire:
Enregistrer un commentaire