I'm a newbie in this technology and in the programming itself, I would really like some help on this issue. I can't make the IDE embedded in the google spreadsheet suggest me a list of the keys of an object as I put a dot in front of the name of this object.
The intention is to create an Apps Script object or function that suggests a list with the names of the pages of a google spreadsheet and that, from the selection of one of the names, returns the respective ID. This return is already effective, but the list with the object's keys, that is, the page names, does not appear as a suggestion. Below is the code that defined and loads the object with its properties:
var pagesGetId = {};
globalThis.pagesGetId = pagesGetId;
function ftoLoad() {
var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); sheets.forEach((sheet) => {
Object.defineProperty(this.pagesGetId, sheet.getSheetName(), {
value: sheet.getSheetId(),
writable: false,
enumerable: true,
configurable: true
});
});
};
ftoLoad();