You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to implement a user-defined function in JavaScript that could be bound in using .registerFunction/.assign/bindings, and take in an arbitrary JSONata function? Right now, all that I receive is an object that I do not know how to evaluate against other data that is provided to the function.
For example, say I have a scenario like the following:
Ignoring what exampleFn does, the JSONata function that gets passed is sent in as an object. This object doesn't seem to have any direct way to evaluate it and run it. This essentially makes it impossible to bind through higher order functions to JSONata, which would be a great help to me as I have been adding on functions that require native JavaScript implementations for performance reasons.
This would also help to make it easier to implement extensions on top of JSONata, similar to what was proposed on #117.
The text was updated successfully, but these errors were encountered:
Thanks for raising this. It would be useful if fn in your example was passed into your extension function as a javascript function that could be invoked directly. I'll see what we can do here.
Hello,
Is it possible to implement a user-defined function in JavaScript that could be bound in using .registerFunction/.assign/bindings, and take in an arbitrary JSONata function? Right now, all that I receive is an object that I do not know how to evaluate against other data that is provided to the function.
For example, say I have a scenario like the following:
Ignoring what exampleFn does, the JSONata function that gets passed is sent in as an object. This object doesn't seem to have any direct way to evaluate it and run it. This essentially makes it impossible to bind through higher order functions to JSONata, which would be a great help to me as I have been adding on functions that require native JavaScript implementations for performance reasons.
This would also help to make it easier to implement extensions on top of JSONata, similar to what was proposed on #117.
The text was updated successfully, but these errors were encountered: