Am trying to create a list using mat-list with below Json structure
{
"Parent1": [
{
"Data1": [
"child1",
"child2"
]
}
],
"Parent2": [
{
"Data2": [
"child3",
"child4"
]
}
]
}
Html Code
<mat-list >
<ng-container *ngFor="let item of (jsonData | keyvalue) ;">
<mat-list-item>
<h3 matLine> {{item.key}}</h3>
<mat-icon>close</mat-icon>
<div class="parent-mat-divider">
<mat-divider></mat-divider>
</div>
</mat-list-item>
<ng-container *ngFor="let child of (item |keyvalue) ;">
<mat-list-item *ngFor="let subChild of (child |keyvalue) ;">
{{subChild.value}}
<mat-icon>close</mat-icon>
</mat-list-item>
<mat-list>
On the first page load it showing values like below.I need to avoid those values
I need to create a list like below based on the above Json

Note: Am not sure it is the right way to iterate the object It will appreciate some one give solution.
Thanks in advance.
