I am loging the messages from my ttn node running the cayenneLPP sketch to a local file on my desktop computer using NodeRed. This works using the following NodeRed flow:

I would like to have the timestamp out of the metadate which i obtained with the following code in the function node:
return {
//Some fields from the metadata
time: msg.metadata.time };
to be logged with the payload. How can I convert the time metadata to be a payload type and combine it so that I get one line log entries with timestamp first followed by the payload. Everything I tried was not successful…
Can somebody give me a hint?