A function which is returning data in objects format. I want to get the single value from this object but it is returning undefined. This is my code.
var todayEvents = plugin.getDateEvents(day);
var str = JSON.stringify(todayEvents);
console.log(str);
This is how it is displaying in console.
[
{
"startDate": "2020-07-14T14:29:53.525Z",
"endDate": 1594823393525,
"summary": "Visit of the Louvre",
"status": "pending"
}
]
I want to get value of status from this object. I tried like this but it is returning undefined value.
str.status
str[0].status
Any suggestion regarding this will be helpful.