These are chat archives for Automattic/mongoose

24th
Mar 2016
Saurabh Vyas
@saurabhvyas
Mar 24 2016 12:49
documents in my collection look like this : {
"_id": {
"$oid": "56f3de2c0f1071e8162cf96d"
},
"memoryitems": [],
"metadata": {
"aliasnames": [],
"itemcount": 4,
"createdon": {
"$date": "2016-03-22T18:30:00.000Z"
},
"lastaccessed": {
"$date": "2016-03-22T18:30:00.000Z"
},
"lastmodified": {
"$date": "2016-03-22T18:30:00.000Z"
}
},
"__v": 0
} I am trying to use findone method and get the results but its giving me empty array var results = memory.find( { metadata : { itemcount : 0 }});