Suppose that you have java based server, and you are calling function which is stored in mongo db: Let say function name is test and impelemntaton is
function(arg1, arg2){
return arg1;
}
DB db;
....
How to correctly pass the arguments? I've tryed simple pass them likewise
db.eval("test(arg1, arg2)", 1, 2);
Unfortunately I am receiving error for wrong reference.