Parsing Javascript file in AEM

Avatar

Avatar

Parvathy_C

Avatar

Parvathy_C

Parvathy_C

18-11-2019

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!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

PuzanovsP

MVP

Avatar

PuzanovsP

MVP

PuzanovsP
MVP

18-11-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

Answers (0)