Created
August 7, 2023 22:15
-
-
Save VenkataA/ea343b118d4ee1e0f0c4160bff985a1f to your computer and use it in GitHub Desktop.
AEM Read Node Contents via ECMAScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = "/var/tsa/intake_counter.json"; | |
var jcrsession = graniteWorkflowSession.adaptTo(Packages.javax.jcr.Session); | |
var node = jcrsession.getNode(path); | |
var is = node.getNode("jcr:content").getProperty("jcr:data").getStream(); | |
var jsonInputString = org.apache.commons.io.IOUtils.toString(is, "UTF-8"); | |
is.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment