Hi,
If a have a Java object (lets say a User object), and I use velocity to template the page so I can access a field in the user object like ${user.id}, is there an easy way to convert this into a javascript object (so I can access the fields of the User object)?
I can assign a value to javascript variable like
var id = "${user.id}";
but if i do
var user = "${user}";
this isn't true:
id == user.id;
And I would rather not have to do
var user = { id: "${user.id}" ...}