Consecutifs $group

hello, i have this chema:
Module:

{code_module:m97,
designation_moddulle:biologie,
coefficient:2,
nombre_epreuves:2,
année:1,
list_epreuves:[{
  Code_epreuve:biologie_emd1,
  date_epreuve:12/03/2023,
  année_epreuve:1,
  nature_epreuve:EMD,
  resultat:[{
    nom:Smith,
    prenom:John,
    valeur_note:15
]}
}]

how can i get:

deliberation:[{
nom:Smith,
prenom:John,
cursus:[{
  code_module:m97
  pv_modulaire:[{
     Code_epreuve:biologie_emd1,
     valeur_note:15
}]
}]
}]