I want log the data in device.calendar.ongoing so I can debug a problem with my script. I have tried 
if (device.calendar.ongoing.length > 0) {
    console.log("All items: " + JSON.stringify(device.calendar.ongoing));
}
but that returned
All items: [{}]
When I did
if (device.calendar.ongoing.length > 0) {
    console.log("All items: " + device.calendar.ongoing);
}
But that returned
All items: 0
Any ideas on what I am doing wrong?
 
                        
for an unknown reason stringify doen't always work with on{x}. I use
this works in my cases.