Hi!
I'm making a request to an online but API.
I'm trying to cicle trought the answer.
While I succeed using a template node, I am kinda lost on using a more elegant JSONata command.
Any help?
[{"id":"2a2b15e6.2a632a","type":"inject","z":"63ccda68.bf7a74","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"740","payloadType":"str","x":370,"y":1320,"wires":[["671ffa20.6402b4"]]},{"id":"671ffa20.6402b4","type":"http request","z":"63ccda68.bf7a74","name":"BUS API","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://gpa.madbob.org/query.php?stop={{payload}}","tls":"","persist":false,"proxy":"","authType":"","x":520,"y":1320,"wires":[["49d2fe0a.829be","ef439313.fc24a"]]},{"id":"49d2fe0a.829be","type":"template","z":"63ccda68.bf7a74","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{#payload}}\n<br> <strong> Line {{line}}</strong> is coming at <i> {{hour}}</i> \n{{/payload}}","output":"str","x":740,"y":1320,"wires":[["35747238.3d4e2e"]]},{"id":"35747238.3d4e2e","type":"debug","z":"63ccda68.bf7a74","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1070,"y":1320,"wires":[]},{"id":"ef439313.fc24a","type":"change","z":"63ccda68.bf7a74","name":"Jsonata extraction (To Be Arrayed)","rules":[{"t":"set","p":"payload","pt":"msg","to":"' Line ' & payload[0].line & \t' in coming at ' & payload[0].hour &\t\"<br>\" &\t' Line ' & payload[1].line & \t' in coming at ' & payload[1].hour &\t\"<br>\" &\t' Line ' & payload[2].line & \t' in coming at ' & payload[2].hour &\t\"<br>\" &\t' Line ' & payload[3].line & \t' in coming at ' & payload[3].hour &\t\"<br>\" &\t' Line ' & payload[4].line & \t' in coming at ' & payload[4].hour \t\t\t\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":1360,"wires":[["35747238.3d4e2e"]]}]