D
D
Dream2021-08-01 11:34:21
Python
Dream, 2021-08-01 11:34:21

How to find value in MongoDB object?

I have account: {messages: 0} , how do I access the messages value with find_one?
61065c001c45f759148506.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Romanov, 2021-08-01
@dreameddd

Like this:
...find_one({'account.messages': 0})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question