I am having big problem with the change node and JSONata this morning (first time I use it). I get the JSONata expression to work just fine if I run it in the debug node or using the test in the change node. But whatever I do when running it, it just returns the first object from the input. No formatting is done what so ever...
These are my nodes:
[{"id":"d1b75b09.98ccf","type":"inject","z":"21ba8344.84d7ec","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":105,"y":280,"wires":[["d5268ad8.fccf4"]]},{"id":"d5268ad8.fccf4","type":"nordpool-api","z":"21ba8344.84d7ec","name":"","area":"SE3","currency":"SEK","x":290,"y":280,"wires":[["98f232b7.7c20b"]]},{"id":"98f232b7.7c20b","type":"change","z":"21ba8344.84d7ec","name":"ConvertToChart","rules":[{"t":"set","p":"","pt":"msg","to":"{\t \"payload\": \t {\t \"series\": [\"SEK/MWh\"],\t \"labels\": [\"\"],\t \"data\": $$.[\t {\t \"x\": Timestamp,\t \"y\": $number(Price)\t }\t ]\t }\t}\t ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":280,"wires":[["f17df13b.dfd648"]]},{"id":"f17df13b.dfd648","type":"debug","z":"21ba8344.84d7ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":280,"wires":[]}]
What I want to do in the end is to show the prices returned from Nordpool in a dashboard chart, but I have not come that far since the output from the change node is just not working as I want to...
Any help would be gratefully appreciated!