I have MongoDB 4.x with collection, which have documents like this
how to make agregation, that return only bot-field, where _id is X? I've tried to use $project:
{
_id: 0,
bot: {$filter: {
input: '$clusters.bots',
as: 'bot',
cond: {$eq: ['$$bot._id', 'X']}
}}
}