我在 mongodb 中有以下列表。> db.article.find().pretty(){ "_id" : ObjectId("5bebcfbb1b48d9974aac78ee"), "no" : 40, "subject" : "string", "content" : "string", "userid" : "string", "comments" : [ { "no" : 1, "content" : "First content", "userid" : "john", "parent" : null, "seq" : 12, "created_at" : ISODate("2018-11-14T16:33:01.943Z") }, { "no" : 2, "content" : "Second", "userid" : "doe", "parent" : null, "seq" : 25, "created_at" : ISODate("2018-11-14T16:33:01.943Z") },}現(xiàn)在我mongoengine在我的 python 應(yīng)用程序中使用。如果我想獲得評(píng)論的 no: 2 的seq字段值(在此代碼中,它是 25),我該如何操作我的查詢?我找到了與它相關(guān)的文檔(http://docs.mongoengine.org/guide/querying.html)但我不知道它與我想要的完全一樣。這里有什么解決辦法嗎?
添加回答
舉報(bào)
0/150
提交
取消
