Good day. Tell me how to upload to Google Table the data received from the site in JSON format. Below is the code, but I get an error at the output. Cannot convert Array to Object [] [] . In Debug mode, you can see that the code is working, and the error occurs in the last line resultRange.setValues (results);
function processXMRAPI() { var ss = SpreadsheetApp.openById('1v2NmYXtURFR3cnrhmuzrcFX48YQTLGRO8Nq4dkL4l1w'); var APIPullSheet = ss.getSheetByName ("APIPull"); APIPullSheet.getRange('A1:M300').clearContent(); var url = "https://bittrex.com/api/v1.1/public/getmarketsummaries"; var responseAPI = UrlFetchApp.fetch(url); var parcedData = JSON.parse(responseAPI.getContentText()); var results = [[]]; //results.push(['MarketName', 'High', 'Low', 'Volume', 'Last', 'BaseVolume', 'TimeStamp', 'Bid', 'Ask', 'OpenBuyOrders', 'OpenSellOrders', 'PrevDay', 'Created']); for(var i in parcedData.result) { results.push(parcedData.result[i]); } resultRange = APIPullSheet.getRange(1, 1, results.length, 13); resultRange.setValues(results); } ![This is a debugging mode, the stop is in the loop on the line results.push (parcedData.result [i]);](https://i.stack.imgur.com/XUsYU.png)
parcedData.result- Grundyresultsform:[[], {},{},{}], but it should look like:[[...],[...],[...]]- Grundy