Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Parsing Javascript file in AEM

Avatar

Level 2

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!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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