I'm just transitioning from Google Apps Script to node.js and Google Cloud Functions, and there's a portion of code from an existing post that I don't understand.
In this post: How to use Google sheets API while inside a google cloud function, @domdomegg listed a code sample that calls the Google sheets API from a Google Cloud Function. I've got that code working in a Google Cloud Function.
However, I don't understand a specific segment of the code:
// This just prints out all Worksheet names as an example
.then(({ data: { sheets } }) => {
res.status(200).send({ sheets });
It's the data: { sheets } bit that I don't understand. I'm thinking this is where I need to put my code to write to a Google Sheet, but as it's a bit of a mystery to me. I'm enough of a noob that I can't yet post a comment back to the original post. Any help for a noob?