I have an API website I made and I want my javascript to read in the values. I have a page http://ec2-54-152-248-65.compute-1.amazonaws.com/temp/ that has this on it:
{'records': [{'a': 'a'}]}
and I want my javascript to read it in and convert it to a JSON. I have this code so far and it isn't working:
$http({
method: 'JSONP',
url: "http://ec2-54-152-248-65.compute-1.amazonaws.com/temp/"
}).success(function(response) {$scope.names = JSON.parse(JSONize(response.records));});
});
Does anyone have any theories on how I could convert this to a JSON and have it read into my web app as something I can ng-repeat.
This is the error in my console.log:
(index):1 Uncaught SyntaxError: Unexpected token :