so I'm working with a system that can only take the query-argument of a .find() query as input, which means that I can not input an iterative script or an aggregation query.
However, I need to be able to find all documents that contain in one of their array fields the value that is set in another field. So, if my documents look as follows:
{ _id: ..., FieldA: x, FieldB: [x, y, z] }
Then I want to find all documents that contain the value of FieldA
in FieldB
, in this example contain x in FieldB
.
Is that at all possible?