Hi
According to Numeric functions · JSONata the function $number("0x12")
should return the parsed number 18
(and not 0x18...)
However in Node-RED 3.0.2 I get error "Unable to cast value to a number"
Can someone confirm ?
I can't seem to find any existing issue on jsonata-js/jsonata however I see that Node-RED use v1.8.6 while the latest release available is 2.0.2
Is it possible to easily update Jsonata on a test instance to see if that solve the problem ?
I'm not much a node.js/npm expert, so guidance would be appreciated.
Or should I just forget Jsonata and move some Javascript code in a function node ?
Thanks
Easy to reproduce with
[{"id":"e6888c350c73926b","type":"inject","z":"e486c4ba444f3570","name":"$number(\"0x12\")","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"$number(\"0x12\")","payloadType":"jsonata","x":340,"y":820,"wires":[["3f49c7d928059338"]]},{"id":"3f49c7d928059338","type":"debug","z":"e486c4ba444f3570","name":"debug 26","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":540,"y":820,"wires":[]}]