i currently using meteorjs 0.9.2
i want to return an object from a server method to client method call
here in that server returning object contain a function as value, i think its possible to do with meteorjs EJSON
server method return object given below
return EJSON.stringify({
plotOptions: {
series: {
stacking: 'normal',
point: {
events: {
click: function() {
alert('ok');
}
}
}
}
},
});
client method receiving given below
Meteor.call("highcharts", Session.get("method"), Session.get("taskId"), function(error, object) {
$("#highcharts #loading").hide();
if(error) throwError(error.reason);
else $("#highcharts").highcharts(JSON.parse(object));
console.log(EJSON.parse(object));
});
but in browser console log i cant get that object element value as function, it show an object given below
{"plotOptions":{"series":{"stacking":"normal","point":{"events":{}}}}}
how i pass a object contain function as return ?