Hello,
I'm working on a MERN stack web application with a Node.JS / MongoDB backend.
Im working on the inbox feature and need to build a aggregation pipeline using Mongoose / MongoDB
The pipeline involves two database collections:
User collection (Documents of each user)
Chat collection (Documents of each message sent)
The goal of the aggregation pipeline is to return the Most Recent Chats (sent or received) and attach the associated User from the User Collection
The inbox component which will be fetching the data, needs to display the 12 most recent 'conversations', with a preview of the most recent message and the associated user.
If you are an expert with Mongoose / MongoDB and building aggregation pipelines and can solve this problem quickly and efficiently, please reach out.
Thank you.
About the recuiterMember since Nov 11, 2022 Ghora Babai
from Nayarit, Mexico