I often need to retrieve the rejection reason from the approval record, especially when using flow designers, excluding the user information and the time stamp.
Here is the script to fetch only the latest rejection comment without including user details, date, and time.
var grAppr = new GlideRecord('sysapproval_approver');
grAppr.addQuery('state','rejected');
grAppr.addQuery('document_id', '217af73e87d319108faced7e0ebb3555'); //Map the matching HR case record.
grAppr.query();
while(grAppr.next()) {
var str = grAppr.comments.getJournalEntry(1); //Returns data with User and Time
var n = str.lastIndexOf(':');
var result = str.substring(n + 1);
gs.info(result); //Returns only comment
}