简体   繁体   中英

How can I get the value from a schema in MongoDB

I want to get the value from id I tryed this code

c = dict["ids"]["id"]
print(c)


{'_id': ObjectId('6070965b28721d6e49c58c74'), 
 'gu_id': 'STRING', 
 'ids': [{'id': 'STRING'}, {'xp': INT}, {'msg': INT}, {'date': INT}]
}

But I always get a error

i write this query at robo3t. Try it your computer.

尝试这个

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM