Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Try to cleanup the data munging

  • Loading branch information...
commit 15d01c223eb817f42c803c6e6f9d9213b4acee34 1 parent f5d2b02
@bobtfish bobtfish authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 app/js/controllers.js
View
8 app/js/controllers.js
@@ -3,8 +3,12 @@
/* Controllers */
function cleanData(data) {
- var jsonStringWithoutEvilAtSigns = angular.toJson(data).replace(/@/g, "")
- return angular.fromJson(jsonStringWithoutEvilAtSigns);
+ var out = {}
+ Object.keys(data).forEach(function(key) {
+ var newKey = key.replace(/@/g, "");
+ out[newKey] = data[key];
+ });
+ return out;
}
function ReportListCtrl($scope, $http) {
Please sign in to comment.
Something went wrong with that request. Please try again.