Howdy, I'm trying to understand how to make a mongoose/MongoDB call to match documents from two different collections which are matched by two fields. Here is an example of the two DocumentsPseudo Doc from Collection A: { _id, date, owner(objectId), other_data, }Pseudo Doc from Collection B: { _id, date, owner(objectId), other_data, }I want to get a list of these documents combined, they need to be matched by date and by owner.Does anyone know how to perform an operation like this? Is this something that would involve an aggregation? I'm new to using mongoose/Mongo for in depth operations so I appreciate any help! Cheers!
Submitted May 09, 2020 at 10:56PM by Ciccio99
No comments:
Post a Comment