嗨,我在mongo中具有以下结构
{
"_id": "233",
"statistics": [
{
"lastCommunicationTime": "2019-03-07 03:29:02 AM",
"statusKey": "1"
},
{
"lastCommunicationTime": "2018-03-07 04:29:02 AM",
"statusKey": "2"
},
],
"altitude": "",
}
我正在尝试提取lastCommunicationTime的所有值。我怎么做?我没有找到真正的解决方案
pipeline = [
{"$match": {"_id": "233"}},
{"$project": {"lastCommunicationTime":1}}
]
dd=posts.aggregate(pipeline)