Let's say I have this JSON:
var myObj = {
{"key1":"value1", "key2":5, "key3":"value3" },
{"key1":"value4", "key2":2, "key3":"value5" },
{"key1":"value6", "key2":4, "key3":"value6" },
}
I want to use this for ng-Repeat. But the values of "key2" must iterate within their own ng-repeat. So something like this:
<ul ng-repeat="x in myObj">
<li> {{x.key1}} </li>
<ul ng-repeat="y in x.key2">
<li></li>
</ul>
<li> {{x.key3}} </li>
</ul>
Obviously this doesn't work. The result of the first array should like this (5 li-elements should be created):
<ul>
<li> value1 </li>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<li> value 3 </li>
</ul>