Last active
April 6, 2021 08:59
-
-
Save tvc97/accbb79f598e4c482d6cf1250a961f0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
req = new XMLHttpRequest() | |
req.open('GET', 'https://tiki.vn/api/v2/me/orders?page=1&limit=5000', false) | |
req.send() | |
a = JSON.parse(req.responseText) | |
total = a.data.reduce((prev, next) => next.grand_total + prev, 0) | |
Intl.NumberFormat('vi-VN').format(total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment