I have the following schema:
var userSchema = mongoose.Schema({
localId: String,
notes: [{}]
});
where notes is an array where each element has filed source. I need to select the document by localId, take the notes, and group the array of notes based on source
