I am using a MERN stack and need to group by certain attribute of schema, so for example: this is my schema,
const likeSchema = new mongoose.Schema({ userId