Angular: Empty Fiddle

http://angularjs.org/

by Ravindra Athreya

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<div ng-controller="MyCtrl">
  <table border="1">
    <tr>
        <th ng-repeat="column in cols">{{column}}</th>
    </tr>
    <tr ng-repeat="row in rows">
      <td ng-repeat="column in cols">{{row[column]}}</td>
    </tr>
  </table>
</div>

JavaScript

var myApp = angular.module('myApp',[]);

function MyCtrl($scope) {
    $scope.rows = [
    {
        "branch": "default", 
        "comment": "Test", 
        "name": "20141228.150706", 
        "score": "0.45000", 
        "time": "0.02",
        "branch2": "default", 
        "comment2": "Test", 
        "name2": "20141228.150706", 
        "score2": "0.45000"
    }, 
    {
        "branch": "default", 
        "comment": "Test", 
        "name": "20141228.150706", 
        "score": "0.45000", 
        "time": "0.02",
        "branch2": "default", 
        "comment2": "Test", 
        "name2": "20141228.150706", 
        "score2": "0.45000"
    }, 
    {
      "branch": "default", 
        "comment": "Test", 
        "name": "20141228.150706", 
        "score": "0.45000", 
        "time": "0.02",
        "branch2": "default", 
        "comment2": "Test", 
        "name2": "20141228.150706", 
        "score2": "0.45000"
    }, 
    {
        "branch": "default", 
        "comment": "Test", 
        "name": "20141228.150706", 
        "score": "0.45000", 
        "time": "0.02",
        "branch2": "default", 
        "comment2": "Test", 
        "name2": "20141228.150706", 
        "score2": "0.45000"
    }, 
    {
        "branch": "default", 
        "comment": "Test", 
        "name": "20141228.150706", 
        "score": "0.45000", 
        "time": "0.02",
        "branch2": "default", 
        "comment2": "Test", 
        "name2": "20141228.150706", 
        "score2": "0.45000"
    }];
    $scope.cols = Object.keys($scope.rows[0]);
}