I need to return the following in a custom REST API I am building using Jackson. The following is simply a Javascript function. Is there a way to return a javascript function as is? Without returning it as string, and then having to parse it on the front end.
{
yFormat: (timestamp) => { return date.getDurationValue(timestamp); }
}