I need assistance with retrieving the entire array [votes] stored within the User Collection. Below is the JSON structure
{
"_id" : "pziqjwGCd2QnNWJjX",
"createdAt" : ISODate("2017-12-21T22:06:41.930Z"),
"emails" : [
{
"address" : "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="483c2d3b3c083c2d3b3c662b2725">[email protected]</a>",
"verified" : false
}
]
"votes" : [
{
"ZyYZ4LDTaeWNMN9eE" : "yes"
},
{
"DSHhkdsjkdhsddsqd" : "no"
}
]
}
Could someone provide guidance on how to display that array using console.log? I want to verify its existence before proceeding with an insertion operation.