I've modified this answer and got it working. However, I want to improve it by translating this JQuery code for uniformity since I'm working with a team. Can I somehow convert the code to JQuery?
Javascript Code
var o = document.querySelector("#divTwo");
var gg = o.querySelector('#tempType [aria-selected="true"]').innerText;
o.querySelectorAll('[templateList="me"] .entry-footer [template-include = "true"]').forEach( (elm) => {
var a = elm.closest( '.popup-temp-entry' ).querySelector( '.entry-header' ).innerText;
var b = elm.closest( '.popup-temp-entry' ).querySelector( '.entry-body' ).innerText;
console.log(a +' - '+ b + ' - ' + gg);
});