Database
[{"_id":"zzzzzz","createdAt":ISODate("2020-07-07T11:45:29.517Z"),"updatedAt":ISODate("2020-07-07T11:45:29.517Z"),"merchantLenderContracts":[["22222"]],"merchantId":"111111","__v":0}]
Query
db.collection.aggregate([{"$match":{$expr:{"$in":["22222",{"$reduce":{"input":"$merchantLenderContracts","initialValue":[],"in":{"$concatArrays":["$$value","$$this"]}}}]}}}])