I have some data that I would like to loop through with ngRepeat and access data dynamically that's either on the top level or nested under a couple of levels.
However, it seems like I can get the top level properties to show up, but not when its nested.
JS:
var mapping = [
{property:'a'}, // works
{property:'b.c1'}, // doesn't work
{property:'b.c2'} // doesnt work
];
var arr = {
a: 'text',
b: {
c1: 'text2',
c2: 'text3'
}
};
HTML:
<div ng-repeat="mappingItem in mapping">
<p>{{arr[mappingItem.property]}}</p>
</div>