in JAVA I generate a String like this:
{
"name":"ali",
"lastName":"cate",
"action":"function(event) {alert(this.name +'clicked');}"
}
and I can use this String pretty easy in javaScript like a JSON object, however i can't execute the function ( in JS) that is described in the action property, I had this error:
TypeError: Object function(event) {alert(this.name +'clicked');}
has no method 'apply'
so... is there any way to make it work?
EDIT (more info)
the problem is that the Json String is generated in Java (with the quotes). and this is and example, actually the real problem is with a highchart pie graph, this recieves the function in an event property and is it who tries to run that.