I'm trying to figure out how to transmit a JS (not JSON) over a REST API, basically the idea is that the client can send the object with functions () that will provide the functionality for posterior execution.
For example How to transmit
var jsObj = {
a: 1
b: function () { console.log("B") }
}
from Node A to Node B, so that now Node B knows how to execute b()
Thank you