I try to access to nested JSON data into nested JSON data. I use ng-repeat, it works for the nested JSON data but not for the nested nested.
The data I want to catch is the server URL and their name.
<tr ng-repeat="site in dT.data.sites">
<td>{{ site.siteName }}</td>
<td><span ng-repeat="country in site.countries">{{ country.country + ' '}}<br><br></span></td>
<!-- Does not work -->
<td><span ng-repeat="country in site.countries">{{ country.masters.name }}</span></td>
<!-- Works, but displays only the first element of the array because of the [0] -->
<td><span ng-repeat="country in site.countries">{{ country.masters[0].name }}</span></td>
<!-- Does not work -->
<td><span ng-repeat="master in site.countries.masters">{{ master.name }}</span></td>
<td></td>
<td></td>
</tr>
Maybe I have to use a function with a if…else method. Or use a service, but I would prefer to use ng-repeat.