Struggling to understand how to use a switch node to switch based on the content of a RowDataPacket returned from a SQL Select in a Function Node.
The output from the SQL Select is always a single name / value object
[ RowDataPacket { access: 1 } ]
and access will either be 0 or 1.
The logic is simple, activate output 1 if access = 1
I have ready many posts and some seem to suggest that I need a split node or another function node to split the array before passing the value to the switch node Is this true?
The was just a fix applied to node-red-node-mysql (v0.1.2) that eliminates that issue so that it will always return an array. So RowDataPacketwill not be in the results of a select anymore.