I have the following object...
var object = doc.$set;
console.log(object);
The console.log above outputs the following...
{
createdBy: 'o5Wye6LLMGNXLn7HY',
createdAt: Mon Apr 11 2016 15:25:35 GMT+1000 (AEST),
'contactDetails.orderedBy': 'MvCun8p6vxndj3cr8',
updatedAt: Mon Apr 11 2016 18:04:14 GMT+1000 (AEST)
}
How can I get the value from 'contactDetails.orderedBy'
?
Where something like this works no problem...
var createdBy = doc.$set.createdBy;
But this doesn't...
var orderedBy = doc.$set.contactDetails.orderedBy;
Is there a way that I can use javascript to extract the value instead? Like maybe convert it to a string and then split it or something along those lines? Is this possible?
Thanks