Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Parsing Javascript file in AEM

Avatar

Level 3

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