Я пытаюсь проверить наличие пустых / отсутствующих полей в моем операторе $ switch, но он не работает. Вот мой код
$switch: {
branches: [
{
case: {
$and: [
{ $gte: ["$SmartPriority", 6] },
{ $ne: ["$FlashTRFPromotionDate", null] },
{ $ne: ["$FlashTRFPromotionDate", ""] },
{ $ne: ["$FlashTRFPromotionDate", false] }
]
},
then: "Greater than"
}
],
default: "EMPTY"
}
Даже если $ ne имеет значение «null» или «false», он не показывает EMPTY (значение по умолчанию). Каким должно быть мое выражение лица?



![Безумие обратных вызовов в javascript [JS]](https://i.imgur.com/WsjO6zJb.png)


Должно получиться что-то вроде этого
"$switch": {
"branches": [
{ "case": { "$gte": ["$SmartPriority", 6] }, "then": "Greater than" },
{ "case": { "$ne": ["$FlashTRFPromotionDate", null] }, "then": "EMPTY" },
{ "case": { "$ne": ["$FlashTRFPromotionDate", ""] }, "then": "Greater than" },
{ "case": { "$ne": ["$FlashTRFPromotionDate", false] }, "then": "EMPTY" }
],
"default": "EMPTY"
}