I am trying to retrieve data from the following link: https://npropendata.rdw.nl/parkingdata/v2/
Opening the link you will notice that it is in a form of a JSON file. I confirm that the data is correct as I copied the data and saved as a .json file locally and was able to use the $http request to retrieve the data.
Now, how do I retrieve this automatically without having to save the file every time manually, as there is no .json extension in the link? Basically I tried:
app.controller('MyCtrl', function($scope,$http){
$scope.entries = [];
$http.get('https://npropendata.rdw.nl/parkingdata/v2/').success(function(data) {
// do something
});
});
But that does not work. Copying the data and saving it as a json file and referring it as follows does work:
app.controller('MyCtrl', function($scope,$http){
$scope.entries = [];
$http.get('savedfilename.json').success(function(data) {
// do something
});
});