I find myself trying to go through the following
heros: any =[
{
id: 200,
name: "Iron man" ,
poderes: [
{
name: 'fuerza' ,
nivel: 200,
description: [
{
trabaja: 'DC',
jefe: [
{ name: 'Tor', edad: 25 }
]
}
]
}
]
},
{
id: 201,
name: "Hulk" ,
poderes: [ {name: 'maldad' , nivel: 500 ,
description: [{ trabaja: 'Marvel',
jefe: [{ name: 'Cap', edad: 105 }]
}]
}]
}
]
From the component I do it in this other way
<table>
<tr>
<th>Nombre</th>
<th>Poder</th>
<th>Trabaja</th>
</tr>
<tr *ngFor="let h of heros">
<td>{{h.name}}</td>
<td *ngFor="let a of h.poderes">
{{a.name}}
</td>
<td *ngFor="let b of a.poderes.description">
{{b.trabaja}}
</td>
</tr>
</table>
I have no problem in showing the name of the hero and his power, but when I want to access the name of where he works he shows me the following error
ERROR TypeError: Can not read property 'powers' of undefined