There is somethign wrong with my data structure. I have resTest containing two object and keys such as pop,province, and address. I can think of couple options to do this but what would be easiest way to do this?
html
var columnsA = ["Pop","Province","Address"];
var columnsB = ["Pop","Province","Address"];
var res = {};
res['A'] = this.columns;
res['B'] = this.columns;
this.resTest = JSON.parse(JSON.stringify(getRes));
//this.resTest = {A: Array(24), B: Array(24)};
<table>
<thead>
<tr>
<th>RegionA</th>
<th>RegionB</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of this.resTest">
<td>{{item?.A}}</td>
<td>{{item?.B}}</td>
</tr>
</tbody>
</table>
error
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables
I am expecting this data structure
{A :{…}, B: {…}}
This is what I have
{A: Array(24), B: Array(24)};