Why does substring gets interpreted as an array

I have the following in a Function Item node:

return item.body.Question_1_Answer_1.substring(0, 41);

Yet in the output of the node is
[ "blah blah blah..." ]

Which disturbs the later nodes flow.

Am I missing something? :thinking:

Welcome to the community @mustafamohsen!

A Function-Item node expects the whole item as a response. So I assume what you want to do is rather something like this:

item.body.Question_1_Answer_1 = item.body.Question_1_Answer_1.substring(0, 41);
return item;

Aha, got it. Thanks

Glad to hear that it was helpful. Have fun!