You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently storing an ical file in aws s3 bucket. I download the file and convert to string.
I then call ical parse method which returns an object. How do i traverse on this object to inspect the entries?
Sample code:
var putObjectPromise = s3.getObject(getParams).promise();
putObjectPromise.then(
(data) => {
var objectData = data.Body.toString('utf-8'); // Use the encoding necessary
var cal = ical.parseICS(objectData);
console.log(`calendar is ${cal.toString()}`);
}
Is it like:
for (var k in cal) {
if (data.hasOwnProperty(k)) {
var ev = data[k]
// Pick out the data relevant to us and create an object to hold it.
var eventData = {
summary: removeTags(ev.summary)
}
// add the newly created object to an array for use later.
eventList.push(eventData);
console.log(`event data is ${eventData.summary}`);
}
}
Thanks,
Shane.
The text was updated successfully, but these errors were encountered:
Hi,
I am currently storing an ical file in aws s3 bucket. I download the file and convert to string.
I then call ical parse method which returns an object. How do i traverse on this object to inspect the entries?
Sample code:
Is it like:
Thanks,
Shane.
The text was updated successfully, but these errors were encountered: