using Angular ng-repeat to display JSON rows/columns

前端 未结 1 1717
天涯浪人
天涯浪人 2021-01-27 12:04

The JSON I am getting back from the API is nested FIRST by field (i.e. table columns), THEN by record(i.e. table rows). So, the JSON looks like this:

myJSON = {
         


        
1条回答
  •  旧巷少年郎
    2021-01-27 12:22

    You can just iterate over one of the arrays and use $index to get the corresponding elements in any other arrays:

    
        
            {{id}}
            {{myJSON.data.gorks[$index]}}
        
    
    

    0 讨论(0)
提交回复
热议问题