fetch(url + '6480978', { method: "POST" }).then(async res => { let data = await res.json() let total = ["bonus", "ct", "t"].reduce((total, coin) => { return total + data[coin].reduce((total, round) => { return total + round.amount / 100; }, 0) }, 0) console.log(total) })