I am newbie in Google Scripting. So i need help with parse JSON from ZOMATO API - there is a documentation: https://developers.zomato.com/documentation?lang=cs#!/restaurant/restaurant
I have this code:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('data');
// API KEY:
var api_key = "XXXX";
// Restaurant ID:
var res_id = "XXXX";
var url = 'https://developers.zomato.com/api/v2.1/dailymenu?res_id=' + res_id + '&apikey=' + api_key;
var options = {
"method": "GET",
"contentType": "application/json",
};
var response = UrlFetchApp.fetch(url, options); // get api endpoint
var json = response.getContentText(); // get the response content as text
var data = JSON.parse(json); //parse text into json
Logger.log(data);
My problem is that i always get this error:
{daily_menus=[Ljava.lang.Object;@7357c5d7, status=success}
What is Ljava.lang.Object ? How can i solve this in Google Scripts? I need parse data from ZOMATO API - for example - i need daily menu for certain restaurant by ID.