Hy,
I was looking for an option to pass expressions to the node. My very simple solution works.
Just add msg.expression to the function call in node-red-contrib-jsonpath.js, line 50:
50: var evalResult = jsonPath.eval(input, node.expression || msg.expression);
Now you can set the expression as a msg.expression. Not sure if this is perfect, but it works!
Eckehard