Javascript – How to do subqueries in aggregation in mongodb?
I am trying to add a field to an aggregation called friendshipStatus and it determines whether the user is friend of the requester or no. i have this whole query [ { $match: (query) ? query : {} }, {…