We present recent results on measurements of jet substructures using grooming techniques with pp and PbPb data collected with the CMS detector at a center-of-mass energy of 5.02 TeV per nucleon pair. The grooming technique is used to focus on the hard structure of the jet by extracting the two subjets which correspond to the hardest parton splitting. This allows us to study medium-induced gluon emission properties and the evolution of partons through dense QCD matter. The hard jet structure is sensitive to the virtuality evolution of a parton in the medium, as well as the role of (de)coherent gluon emitters. Results and prospects on the transverse momentum balance, mass and angular difference of the two hard subjets over a wide range of jet transverse momentum and various collision centrality selections are discussed.