I m facing a little tricky thing in angular2 template table . I have the following json :
users :
{
userid : 123,
username: 'test',
acc : [
{
accid: 382746,
cyc: [
{
cycid: 28734,
det: [
{
detid: 239876
}
},
{
cycid: 3728,
det :[
{
detid: 632
},
{
detid: 2783
}
},
{
cycid: 3729,
det :[
{
detid: 633
},
{
detid: 2785
},
{
detid: 78236
}
]
}
}
]
}
And I would like to display in an acc table list with the last of cyc and last det of the last cyc. like the following :
---------------------------------------------------------------------
| acc id | cyc id | det id |
---------------------------------------------------------------------
| 382746 | 3729 | 78236 |
---------------------------------------------------------------------
Any idea how to do it ?