I am new in mongodb working on to develop chat application,
from two collections I want result with fields names like _id, username, fname, lname, isOnline, updatedAt, count. _id,username,fname,lname,isOnline and updatedAt comes under users collection and count which I have to obtain based on, _id(sender_id) and active_user(which I pass from function when user gets online, its receiverId) having isRead=false.
here User devanggarach is online, I wanted to get list of users with count of unread messages(isRead=false)