I want to give a response from the server like this:
{foo: "some value", bar: function(){console.log(this);}}
But if I write the response line in the controller like so:
render json: {foo: "some value", bar: 'function(){console.log(this);}'}
The result will be as follows:
{foo: "some value", bar:"function(){console.log(this);}"}
"from the result.