Tasmotta MQTT to InfluxDB

Hi, I am trying to take my MQTT string sent to me by Tasmota (TH16) and send it to InfluxDB
The string is

{"Time":"2019-12-20T20:52:22","AM2301":{"Temperature":18.4,"Humidity":67.7},"TempUnit":"C"}

and I believe that I will need to get it into a form like this: (as seen in a debug node)

rflink : msg.payload : Object
object
temp: 18.4
humidity: 67.7
TempUnit: "C"

before sending to a influxdb out node.

Could someone please confirm if I need to send the string through a JSON node and
some guidance on the suitable code for a function node that will give me the result suitable for sending to the InfluxDB node

If you set the mqtt node to parsed json object mode then it should return a javascript object rather than a string. Feed the output into a debug node to check whether it is a string or an object. The influxdb node also requires an object not a string so all you need to do is to move the bits about to get the required structure.

... possibly using a change node