var teams = [];
for (var i = 2; response.values[i].length >= 1; ++i) {
teams.push({
- "name": response.values[i][0],
- "shortname": response.values[i][1],
- "nplayed": parseInt(response.values[i][2]),
- "gd": parseInt(response.values[i][3].replace(/−/, '-')),
- "pts": parseInt(response.values[i][4])
- });
+ "name": response.values[i][0],
+ "shortname": response.values[i][1],
+ "nplayed": parseInt(response.values[i][2]),
+ "gd": parseInt(response.values[i][3].replace(/−/, '-')),
+ "pts": parseInt(response.values[i][4])
+ });
}
var games = [];
for (var i = 12; response.values[i] !== undefined && response.values[i].length >= 1; ++i) {
if (response.values[i][2] && response.values[i][3]) {
games.push({
- "name1": response.values[i][0],
- "name2": response.values[i][1],
- "score1": parseInt(response.values[i][2]),
- "score2": parseInt(response.values[i][3])
- });
+ "name1": response.values[i][0],
+ "name2": response.values[i][1],
+ "score1": parseInt(response.values[i][2]),
+ "score2": parseInt(response.values[i][3])
+ });
}
}
console.log(games);