Is there any way that I can pass a function as a json string (conversion with JSON.stringify), send it to another function, parse the json and then execute the function that
take a look at the JSONfn plugin.
http://www.eslinstructor.net/jsonfn/
it does exactly what you're asking for.
-Vadim