Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix

  • Loading branch information...
commit d7034b186fe17d2c99682eb1fb4a292df9029cc0 1 parent 15d01c2
@bobtfish bobtfish authored bobtfish committed
Showing with 8 additions and 4 deletions.
  1. +8 −4 app/js/controllers.js
View
12 app/js/controllers.js
@@ -3,17 +3,21 @@
/* Controllers */
function cleanData(data) {
- var out = {}
- Object.keys(data).forEach(function(key) {
+ var out = {};
+ for (var key in data) {
var newKey = key.replace(/@/g, "");
out[newKey] = data[key];
- });
+ }
return out;
}
function ReportListCtrl($scope, $http) {
$http.get('data/reports_latest.json').success(function(data) {
- $scope.reports = cleanData(data);
+ var d = [];
+ data.forEach(function(datum) {
+ d.push(cleanData(datum));
+ });
+ $scope.reports = d;
});
$scope.orderProp = 'age';
Please sign in to comment.
Something went wrong with that request. Please try again.