【发布时间】:2021-03-17 16:28:23
【问题描述】:
我有类似的疑问
{
"title": "sjncx",
"desciption": "cknxk jckd",
"price": "29.99",
"stock": "3",
...
}
如果标题is not empty.(标题存在且不为空),我需要过滤数据。还有is empty 喜欢~title: ""~(所以标题存在但为空)
我试过is not empty:
{'title': {'$ne': 'null'}}
我试过is empty:
{'title': {'$type': 10}}
这行不通。会是什么原因?
【问题讨论】:
标签: python django mongodb mongodb-query