Mongoose - How to sort a query based on a populated field

I have the following User:

    username: String,
    password: String,
    group: {
      type: Schema.Types.ObjectId,
      ref: "Group"

Then i have the following Group:

    nome: String,
    code: String,

I want to sort a collection of Users by the name of their Group, alphabetically.

I am currently doing this:

UserModel.find({key, skip, limit}).populate({ path: "group", select: "nome" }).sort({"group.nome": "asc"})

But it is not sorting at all.

Thank you for your help!

I guess it’s too late, but have you tried this?:

const options = { sort: [['', 'asc' ]] };

  .populate({ path: 'group', select: 'nome', options })

I get Invalid sort() argument, must be array of arrays

This worked for me:
options:{ sort: [{‘name’, ‘asc’ }] }