{
"_id" : ObjectId("5bc832db42756b4d38bba983"),
"type" : "photo",
"severitylevel" : NumberLong(0),
"location" : {
"loc" : {
"lng" : 77.653322,
"lat" : 13.06511
}
}
{
"_id" : ObjectId("5bc8338c42756b4d38bba9bb"),
"type" : "text",
"severitylevel" : NumberLong(1),
"location" : {
"loc" : {
"lng" : 77.653322,
"lat" : 13.06511
}
}
{
"_id" : ObjectId("5bc83d0c42756b8b3abba961"),
"type" : "photo",
"severitylevel" : NumberLong(2),
"location" : {
"loc" : {
"lng" : 77.653322,
"lat" : 13.06511
}
}
现在我只想在值等于0时从文档中删除字段severitylevel,否则就不使用查询。
关于如何做到这一点有什么建议吗