I´ve been running around in iterated circles for several hours and have the sense the answer is staring me right in the face (and I have read a dozen similar questions) but I can't seem to see it.
I have this object:
{id: 1, firstName: "Rob", lastName: "Thompson", agent:
"[email protected]", phone: null, …}
agent: "[email protected]"
comments: Array(2)
0: {id: 3, comment: "testing another comment"}
1: {id: 8, comment: "second comment"}
length: 2
__proto__: Array(0)
firstName: "Rob"
id: 1
lastName: "Thompson"
phone: null
__proto__: Object
that I am trying to display the comments on when I have selected that particular user.
I can access the first level fields easily and an individual comments via:
{{gotClient.comments[0].comment}}
but in trying to display all comments associated with a user I am drawing a literal blank. This was the most recent attempt:
<div>
<ol>
<li *ngFor="let item of comments" >
<div>{{item.comments}}</div>
<ol>
<li *ngFor="let subItem of item['comments']">
<div>{{subItem.comment}}</div>
</li>
</ol>
</li>
</ol>
</div>
That´s producing literally a blank.
Please advise.