Так что я хочу использовать angular, чтобы получить определенное значение из этого API:
https://ergast.com/api/f1/2013/driverStandings.json
я сейчас использую
app.controller("api", function($scope, $http) {
$scope.home = "This is the homepage";
$scope.getRequest = function() {
console.log("I've been pressed!");
$http.get("https://ergast.com/api/f1/2013/driverStandings.json").then(
function successCallback(response) {
//$scope.response = response.data;
console.log("response.data.MRData.StandingsTable");
console.log(response.data.MRData.StandingsTable);
console.log("response.data.MRData.StandingsTable.StandingsLists.0.DriverStandings");
console.log(response.data.MRData.StandingsTable.StandingsLists.DriverStandings);
},
function errorCallback(response) {
console.log("Unable to perform get request");
}
);
};
});
, который дает мне это как возвращение
![the return i get with the current code](https://i.stack.imgur.com/g0zPU.png)
0 в том смысле, что я не знаю, как передать это значение, оно не позволит мне поместить его в запрос, и я хочу получить массив DriverStandings в этом API.