Array dropping bits in change node

I'm having an issue where I am piping 16 bits of an arrange into a change node to give them English names but for some reason the output is only keeping the first 8 bits, or 8 statements and abandoning everything else.
Here is the flow overview:


and here is a snippit from the change node config

ideally this should process all 16 bits

Don't use move, use set.

1 Like

The problem is the order you are doing the moves.

When you move payload[0] you are removing the first item of the array - so the array now has 15 elements and what was at index 1 is now at index 0. So when the next rule moves payload[1] it's actually moving what was originally payload[2] and so on.

I'd suggest changing from 'move' to 'set' to preserve the original array and then do a delete at the end.

Just be aware the set operation expects the arguments to be the other way around.

Thanks,

Blockquote
Just be aware the set operation expects the arguments to be the other way around.

Blockquote

Was what i was sticking on, cheers.

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