Having issues with my node RED Code
trying pull information from Watson but getting an error in my function node
CODE:
msg.payload = {
chatId : msg.chatId,
type : "message",
content : msg.payload.output.text[0]
};
return msg;
ERROR:
"TypeError: Cannot read properties of undefined (reading '0')"