我没有从JSON解析中获取输出。
function pullJSON(data) {
var url="https://www.eventbriteapi.com/v3/subcategories/?event_status=live&token=XXXXXXXXX&page_count=4"; // Paste your JSON URL here
var response = UrlFetchApp.fetch(url); // get feed
var data = JSON.parse(response.getContentText()); //
var keys = Object.keys(data).map(function(key){
Logger.log(key + ':' + data[key]);
return key + ':' + data[key]});
我只需要子类别:请参阅下面的JSON
{
"pagination":
{
"object_count": 185,
"page_number": 1,
},
"subcategories":
{
"resource_uri":https://www.eventbriteapi.com",
"id": "1001",
"name": "Startups & Small Business",
}
},