I'm trying to get the first JSON object from the video array, I only want to get full highlights and not the goals.
{
"response": [
{
title: "United vd Chelsea",
"videos": [
{
"title": "Highlights",
"embed": "<div>Full highlight video is embed here</div>"
},
{
"title": "goal 1",
"embed": "<div>goal is embed here</div>"
},
{
"title": "goal 2",
"embed": "<div>goal is embed here</div>"
}
]
},
{
title: "Arsenal vs Lfc",
"videos": [
{
"title": "Highlights",
"embed": "<div>Full highlight video is embed here</div>"
},
{
"title": "goal 1",
"embed": "<div>goal is embed here</div>"
},
{
"title": "goal 2",
"embed": "<div>goal is embed here</div>"
}
]
}
....
]
}
Here is my component.html, this returns full highlights and goals videos. I only want full highlight videos
<div *ngFor="let results of data.response.slice(0,6)">
<div class="panel panel-default">
<div *ngFor="let result of results.videos">
<p [innerHTML]="result.embed | safe"> </p>
<p>{{result.title}}</p>
</div>
Can anyone help, please?
ngIf='result.title.includes('Highlights')'