I am trying to list all of the slide object id's in a given presentation. However, res.data.slides.objectId
always come back as undefined. Code:
slides.presentations.get({
presentationId: id,
}, (err, res) => {
if (err) return error(err);
length = res.data.slides.length;
for (a = 0; a <= length; a++){
let ids = res.data.slides.objectId[a];
console.log(ids);
slideObjectIds.push(ids);
console.log(slideObjectIds);
}
});
I've tried using JSON.parse(res.data.slides.objectId)
, but this stops at u, it will probably be undefined. I know it is res.data.slides.objectId because I starting by logging (console.log
)res
, It was under data
, then I logged res.data
, and so forth, and found that res.data.slides
worked, but res.data.slides.objectId
did not work.
Here is the response page.
Thanks for your help!