Add payload to an array

I have issue getting more quotation every time new new payload pushed to an array.
The flow is working fine without connecting to csv node. Please advise



flows (12).json (3.4 KB)
.

change your function to ...

var array = flow.get('arraytest') || [];
array.push(msg.payload);
flow.set("arraytest", array);
msg.payload = [...array];
return msg;
1 Like

it works. What is the three doted line functioning to?

It is called spread syntax

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.