Parsing Javascript file in AEM | Community
Skip to main content
Level 2
November 18, 2019
Solved

Parsing Javascript file in AEM

  • November 18, 2019
  • 1 reply
  • 2638 views

Hi All,

I have a requirement to parse javascript file in OSGI Bundle and retrieve details from it.

I have done parsing of JSON only till now.

Do we have AEM libraries to parse Javascript ?

Sample JS file:

var xyz = "firstname"

var age = 30

family="Tech family";

details=[["Column1","Column2","Column3",...], [....], [.....] ]

Any pointers will be really helpful.

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Peter_Puzanovs

Hi Parvathy,

To what end do you want to parse Javascript?

It's possible to use build in Google Closure Compiler to compile JS.(Build in AEM OOTB)

It's possible to include library in your code to parse JS in any way you prefer.(Custom code)

It's possible to include Chrome driver and run your code via Chrome driver.(Custom code)

Regards,

Peter

1 reply

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
November 18, 2019

Hi Parvathy,

To what end do you want to parse Javascript?

It's possible to use build in Google Closure Compiler to compile JS.(Build in AEM OOTB)

It's possible to include library in your code to parse JS in any way you prefer.(Custom code)

It's possible to include Chrome driver and run your code via Chrome driver.(Custom code)

Regards,

Peter