I have a nested array and I want to display this with mat-table.
In the array are two different modules "Flex" with several positions that are to be displayed in a table.
Since there are two "Flex" modules in the array, two tables should also be displayed like this example:
FLEX
| Position | ID | Menge | Bezeichnung | BP_Gesamt |
|---|---|---|---|---|
| 1 | STZBH | 2 | Xpress weiss | 1998,00 |
| 2 | STZBG | 5 | Xpress schwarz | 3998,00 |
FLEX
| Position | ID | Menge | Bezeichnung | BP_Gesamt |
|---|---|---|---|---|
| 1 | STZBH | 4 | Xpress weiss | 3996,00 |
| 2 | STZBG | 4 | Xpress schwarz | 3996,00 |
[
{
"module": "Flex",
"positionen": [
{
"Position": 0,
"ID": {
"id": "XLEW_1_2_2",
"wert": "STZBH"
},
"Menge": {
"id": "XLEW_1_2_5",
"wert": "2"
},
"Bezeichnung": {
"id": "XLEW_1_2_6",
"wert": "Xpress weiss"
},
"BP_Gesamt": {
"id": "XLEW_1_2_17",
"wert": "1998,00"
}
},
{
"Position": 1,
"ID": {
"id": "XLEW_1_2_2",
"wert": "STZBH"
},
"Menge": {
"id": "XLEW_1_2_5",
"wert": "5"
},
"Bezeichnung": {
"id": "XLEW_1_2_6",
"wert": "Xpress weiss"
},
"BP_Gesamt": {
"id": "XLEW_1_2_17",
"wert": "3998,00"
}
}
]
},
{
"module": "Flex",
"positionen": [
{
"Position": 0,
"ID": {
"id": "XLEW_1_2_2",
"wert": "STZBH"
},
"Menge": {
"id": "XLEW_1_2_5",
"wert": "4"
},
"BP_Gesamt": {
"id": "XLEW_1_2_17",
"wert": "3996,00"
}
},
{
"Position": 1,
"ID": {
"id": "XLEW_1_2_2",
"wert": "STZBG"
},
"Menge": {
"id": "XLEW_1_2_5",
"wert": "4"
},
"Bezeichnung": {
"id": "XLEW_1_2_6",
"wert": "Xpress schwarz"
},
"BP_Gesamt": {
"id": "XLEW_1_2_17",
"wert": "3996,00"
}
}
]
}
]
I'm new to Angular and mat-table and couldn't find a solution for my problem.
Can someone help me