I am trying to learn this, so was reading the info on this page: Redirecting….
Mainly because I would like to split this:
Output is coming from a html node as a single message containing an array in msg.payload.
(in case off is this a part of the flow)
[{"id":"d2b743ab.0d34f","type":"debug","z":"1cab3146.72bbcf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":830,"y":480,"wires":[]},{"id":"6e5c1a6c.76609c","type":"function","z":"1cab3146.72bbcf","name":"get values","func":"var outputMsgs = [];\nvar words = msg.payload.split(\" \");\nfor (var w in words) {\n outputMsgs.push({payload:words[w]});\n}\nreturn [ outputMsgs ];","outputs":2,"noerr":0,"x":650,"y":480,"wires":[["d2b743ab.0d34f"],[]]},{"id":"37d730e1.bfdcb8","type":"http request","z":"1cab3146.72bbcf","name":"get info","method":"GET","ret":"txt","url":"http://192.168.2.33","tls":"","x":280,"y":520,"wires":[["a28f6034.7c2028"]]},{"id":"9870e91c.b1968","type":"inject","z":"1cab3146.72bbcf","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":520,"wires":[["37d730e1.bfdcb8"]]},{"id":"b12fde4e.57f228","type":"debug","z":"1cab3146.72bbcf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":590,"y":560,"wires":[]},{"id":"a28f6034.7c2028","type":"html","z":"1cab3146.72bbcf","name":"","property":"payload","outproperty":"payload","tag":"h3","ret":"html","as":"single","x":430,"y":520,"wires":[["b12fde4e.57f228","6e5c1a6c.76609c"]]}]
This only produces a error.
"TypeError: msg.payload.split is not a function"
Where am I going wrong with this?