I have an array similar to this [{"FirstValue":{"SubValue1":"ReallyLongValue"}, "SecondValue": "Michigan" }, {"FirstValue":{"SubValue2":"John"}, "SecondValue": "Vegas" }]
I need to be able to create a table like the following SubValue1: ReallyLongValue Michigan SubValue2: John Vegas
I have an ng-repeat going over the outer array which creates a directive. Inside of that directive I do another ng-repeat as follows
<td ng-repeat="(type, name) in employeecell.FirstValue">
{{type}}
<td>{{type}}</td>
<td>{{name}}</td>
<td>{{employeecell.SecondValue}}</td>
<td>
<button>test</button>
</td>
</td>
This will bind the first type but once it reaches the next {{type}} it is just blank. I have tried using a div instead for the ng-repeat which does not work. I need to be able to get the actual value of the key "SubValue" as that is not potentially known.
Maybe I am approaching this incorrectly. I created a plnkr to give an idea of what I am going for.