@Gayathri this post might be helpful.
Convert a variable of type java.util.ArrayList so I can access it with JS