Skip to content

$filter is not working #6

@Fauphi

Description

@Fauphi

If I use $filter in my aggregation it returns an empty array:

const products = ProductsNew.aggregate([
		{$match: {'variants._id': {$in:[...]}}},
		{$project: {
			variants: {
				$filter: {
					input: '$variants',
					as: 'variant',
					cond: {$in: ['$$variant._id', [...]]}
				}
			}
		}}
	])

I'm using Meteor v1.11 and MongoDriver 3.6.0. If I try this query in RoboMongo it works.

Is $filter something that this package doesn't support?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions