Я пытаюсь отфильтровать данные, используя MongoDB
db.vouchers.aggration([{$match:{$and:{$in:["test1","test2"]}}])
, но возвращает пустой массив
let contactsAfterFilter = await Contact.aggregate([
{
$project: {
createdAt: 1,
gender: 1,
customer_phone: 1,
customer_name: 1,
customer_email: 1,
birthday_date: 1,
anniversary_date: 1,
source_type: 1,
tags: 1,
bday: {"$month": '$birthday_date'},
aday: {"$month": '$anniversary_date'}
}
},
{
$match: {"$and": {$in: ["test1", "test2"]}}
},
{
$project: {
createdAt: 1,
gender: 1,
customer_phone: 1,
customer_name: 1,
customer_email: 1,
birthday_date: 1,
anniversary_date: 1,
source_type: 1,
tags: 1
}
},
]);