How to concatenate text and msg.payload in function?

How can I concatenate text and msg.payload in a function like below?

I want to remove title and show the text “Nytt spotpris:” before the msg.payload in the message.

msg.payload = { data: { title: “Nytt spotpris:”, message: msg.payload } }
return msg;

msg.payload = { "data": { "title": "Nytt spotpris: " + msg.payload } }
return msg;
2 Likes