Remove pointer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var element = document.getElementsByClassName("datastore-cols"); | |
var $scope = angular.element(element).scope(); | |
var objects = $scope.objects; | |
var new_objects = []; | |
for (var i = 0; i < objects.length; i++) { | |
var params = {}; | |
var object = objects[i]; | |
for (var field in object) { | |
if (typeof object[field] === 'object' && object[field].__type === 'Pointer') { | |
object[field].__type = '_Pointer'; | |
} | |
params[field] = object[field]; | |
} | |
new_objects.push(params); | |
} | |
$scope.$apply(function() { | |
$scope.objects = new_objects; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment