Thanks both.
Since msg..topic and msg.payload are from 2 different sources, I guess i must join them anyhow first?
[{"id":"34ef0afe.9a44b6","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"27433d2.7800bc2","type":"http request","z":"34ef0afe.9a44b6","name":"","method":"GET","ret":"obj","paytoqs":false,"url":"https://api.deutschebahn.com/timetables/v1/fchg/8004404","tls":"","persist":false,"proxy":"","authType":"bearer","x":430,"y":100,"wires":[["33d6eb77.12a564"]]},{"id":"9d9966c7.d4f358","type":"inject","z":"34ef0afe.9a44b6","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":200,"wires":[["87feadb9.5b8dc","27433d2.7800bc2"]]},{"id":"b1b0b903.57d438","type":"http request","z":"34ef0afe.9a44b6","name":"","method":"GET","ret":"obj","paytoqs":false,"url":"https://api.deutschebahn.com/timetables/v1/plan/8004404/{{{payload}}}","tls":"","persist":false,"proxy":"","authType":"bearer","x":410,"y":260,"wires":[["56dd9042.7d7d"]]},{"id":"87feadb9.5b8dc","type":"time-comp","z":"34ef0afe.9a44b6","outputs":1,"name":"","positionConfig":"aba1f65b.eda0b8","input":"","inputType":"date","inputFormat":"0","inputOffset":0,"inputOffsetType":"none","inputOffsetMultiplier":60000,"rules":[],"checkall":"true","result1":"","result1Type":"msgPayload","result1Value":"","result1ValueType":"input","result1Format":"yyMMdd/HH","result1Offset":0,"result1OffsetType":"none","result1OffsetMultiplier":60000,"x":200,"y":260,"wires":[["b1b0b903.57d438"]]},{"id":"56dd9042.7d7d","type":"html","z":"34ef0afe.9a44b6","name":"","property":"payload","outproperty":"payload","tag":"s","ret":"attr","as":"single","x":630,"y":220,"wires":[["236b8ce3.fc1f54"]]},{"id":"236b8ce3.fc1f54","type":"change","z":"34ef0afe.9a44b6","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"payload[0].id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":180,"wires":[[]]},{"id":"33d6eb77.12a564","type":"xml","z":"34ef0afe.9a44b6","name":"","property":"payload","attr":"","chr":"","x":630,"y":100,"wires":[["73948ba8.543a14"]]},{"id":"73948ba8.543a14","type":"change","z":"34ef0afe.9a44b6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.timetable.s","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":100,"wires":[[]]},{"id":"ad94e4f1.6168f8","type":"change","z":"34ef0afe.9a44b6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[\"$\".id = $$.topic ]{ \"ar\" : ar, \"dp\" : dp }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1110,"y":160,"wires":[[]]},{"id":"626820e1.c325d","type":"function","z":"34ef0afe.9a44b6","name":"find","func":"var id = msg.topic;\nvar payload = [msg.payload[0], msg.payload[1], msg.payload[2], msg.payload[3]];\n\nfunction findTrain(payload){\n return payload == id;\n}\n\nfunction myFunction(){\n document.getElementById(\"$.id\").innerHTML = payload.find(findTrain);\n}\n\nmsg = payload;\nreturn msg;\n","outputs":1,"noerr":0,"x":1070,"y":120,"wires":[[]]},{"id":"aba1f65b.eda0b8","type":"position-config","z":"","name":"Niederroth","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"}]