I want to display nested array in table. Array structure:
0:
value1:"something",
...
firstNestedArray:{
value2:"something2",
...
secondNestedArray:{
value3:"something3",
...
thirdNestedArray:{
value4:"something4",
...
}
}
}
Problem is that I don't know how to correctly process this array to display it in table.
I tried this:
<tbody data-ng-repeat="item1 in firstNestedArray">
<tr data-ng-repeat="item2 in item1.secondNestedArray">
<td>{{item1.value1}}</td>
<td>
{{item2.value2)}}
<br>
{{item2.value3)}}
</td>
<!-- Problem appears here: -->
<td>
{{thirdNestedArray.value1}}
</td>
</tr>
</tbody>
How can i display all this thirdNestedArray values that I need? Because all this values from array have to be displayed in one row.
|column1|column2|column3|column4|column5|
|value1 |value2 |value3 |value4 |value5 |
I've tried to do it like this bu this doesn't work:
<tbody data-ng-repeat="item1 in firstNestedArray">
<tr data-ng-repeat="item2 in item1.secondNestedArray">
<td>{{item1.value1}}</td>
<td>
{{item2.value2)}}
<br>
{{item2.value3)}}
</td>
<!-- Does not work: -->
<div data-ng-repeat="item2 in item1.thirdNestedArray">
<td>
{{item2.value4}
</td>
</div>
</tr>
</tbody>
<tbody>markup to group your rows. Don't usedivanyway, applyngRepeatdirective totr/tdyou want to repeat