I have a video array which is an element in an object of a response array . Now i want to return only a single video for each response title i.e , Each match should only have one highlight video.
Here's my endpoint
"response": [
{
"title": "Chelsea - Brighton",
"competition": "ENGLAND: Premier League",
"videos": [
{
"title": "Highlights",
"embed": "<div> A video 1<\/div>"
},
{
"title": "Highlights",
"embed": "<div> A video 2 <\/div>"
}
]
},
{
"title": "Brentford - Manchester City",
"competition": "ENGLAND: Premier League",
"videos": [
{
"title": "Highlights",
"embed": "<div> A video <\/div>"
}
]
}
}
My template
<div class="panel">
<div *ngFor="let video of result.videos">
<ng-container *ngIf="video.title == 'Highlights'">
<p [innerHTML]="video.embed | safe"></p>
<p>{{out.title}}</p>
</ng-container>
</div>
</div>
</div>```
I've tried ```<div *ngFor="let video of result.videos[0]"></div>``` But this gives only a single team result