Function node and merge

I need to convert an array to seperate vars and keep the old message.
this is how i solved it but i think there is a better way to include the old message in the new one other then include all vars one by one....like i did...

var msg_copy = RED.util.cloneMessage(msg); // menu,
msg = JSON.parse(JSON.stringify(msg.fq[msg.fq_a]));

// define the old msg again from the copy
msg.fq = msg_copy.fq;
msg.fq_l = msg_copy.fq_l;
msg.fq_a = msg_copy.fq_a;

return msg;

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