Skip to content

Instantly share code, notes, and snippets.

@hiroto3432
Last active December 1, 2017 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroto3432/af9f4753b3e14623c70a798eb3de6c0c to your computer and use it in GitHub Desktop.
Save hiroto3432/af9f4753b3e14623c70a798eb3de6c0c to your computer and use it in GitHub Desktop.
function myFunction() {
var response = UrlFetchApp.fetch("https://so2-api.mutoys.com/json/sale/all.json");
var json = JSON.parse(response.getContentText());
var n = 0;
while(1){
try{
var item = json[n]["item_id"];
var area = json[n]["area_id"];
if(item == 106){
if(area == 2){
var p = json[n]["price"];
var u = json[n]["unit"];
Logger.log(p + "," + u);
}
}
n++;
}
catch(e){
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment