第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

mongoengine 在嵌套字段上獲取值

mongoengine 在嵌套字段上獲取值

至尊寶的傳說 2021-08-17 16:02:36
我在 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)但我不知道它與我想要的完全一樣。這里有什么解決辦法嗎?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 261 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)