I return a resource with a URL
$resource(\"http://foo.com/bar.json\").get().
$promise.then(function(data){ $scope.result = data},
If you look at the angular source here:
https://github.com/angular/angular.js/blob/master/src/ngResource/resource.js#L505
There is a toJSON method on the Resource prototype chain that will accomplish this for you.
For example:
$resource("http://foo.com/bar.json").get(function(res) {
$scope.result = res.toJSON();
});