I do not think you can use JS to get this type of information - you would need to use the Strongly types API: "The Adobe AEM Quickstart and Web Application." So to hook this API into an HTL component - you should use SLing Model - not JS HTL.
Lokesh covers this in this webinar: Scott's Digital Community: [Webinar | February ] Ask the AEM Community Expert: Best practice to query JCR data using Que…