Say I have a nested object literal, and I want to display its contents in a table. If the object is 2 levels deep, I can use:
<table>
<thead>
<tr>
<td>key</td>
<td>value</td>
</tr>
</thead>
<tbody ng-repeat="(key01, value01) in data">
<tr ng-repeat="(key02, value02) in value01">
<td>{{key02}}</td>
<td>{{value02}}</td>
</tr>
</tbody>
</table>
If I have a nested object that is 3 or 4 levels deep, using a similar method how would I display the data in a table? The best I have is from this previously answered question, however I do not want conduct this logic in a controller, as suggested here.
I need a way to nest more than 2 ng-Repeats as seen above since in my application, the key names are variable at data generation.
An example of a 3 level deep nest object:
$scope.someVar = { 'data': {
'A': {
'x':'someValue'
},
'B': {
'y':'anotherValue'
}
}
}