I have a certain JS File in DAM, that contains a JSON. I would like to access that file in the helper JS using any methods of JavaScript USE API in Sightly. I know it can be done using Java quite easily, but I would like to do it in a manner that I do not want to touch any Java Code.
I tried things like below. But after that, an input stream is unavailable to convert it to a stream data.
request.resourceResolver.getResource("/path/to/dam/file.js");
AND
request.resourceResolver.getResource("/path/to/dam/file.js").adaptTo(com.adobe.granite.asset.api.Asset);