Example:
I have the following Object:
{
"Person": {
"Name": {},
"Hobbies": {
"0": {
"Description:Soccer": {},
"IsActive:false": {}
},
"1": {
"Description:Hockey": {},
"IsActive:false": {}
},
"2": {
"Description:Tennis": {},
"IsActive:true": {}
}
}
}
}
I would like to loop through the array and check wether any hobby is active. If so it should return true, and display an image.
<img [src]="Person.Hobbies != null ? './images/hobby.png' : ''"/>
I would like the image to only show one time.
Is that possible using html?