How to filter many to many relations with array

How can I filter an “many to many” relationship field with an array?

The array which would filter the content type [2,9] (array), which would return a record which the relationship field could look like this [2,3,11,44,24,49,9] (relationshipField).

filters: {
	$and: [
		{ relationshipField: { $in: array } },
                { relationshipField: { $NotIn: array2 } },
	]
}

Any ideas?

1 Like