I need help with my loop. I try to get data from Google Finance API. Google doesn't provide multi-tiker API so 1 request per 1 ticker. For 1 ticker, it's work well, but I need more than one. I try to do it in a loop but I get
undefined[object Object][object Object]
.controller('currency', function ($scope, $http){
var tickers =["EURUSD","AUDUSD];
for (i = 0; i < 2; i++) {
$http.get('https://www.google.com/finance/info?q=CURRENCY%3a'+tickers[i]).then(function successCallback(response) {
$scope.currencydata = $scope.currencydata + JSON.parse(response.data.substr(3));
})}
})
$http.getis asynchronousvar tickers =["EURUSD","AUDUSD"];