How do I use a wildcard in my lookup foreignField?
I’m trying to make a lookup, where the foreignField is dynamic: { $merge: { _id: ObjectId(’61e56339b528bf009feca149′) } }, { $lookup: { from: ‘computer’, localField: ‘_id’, foreignField: ‘configs.?.refId’, as: ‘computers’ } } I know that the foreignField always starts with configs and ends with refId, but the string between the two is dynamic. Here is an… Read More How do I use a wildcard in my lookup foreignField?