Compare two numbers


A very basic noob question that I'm struggling to figure out.
I have 2 payloads with numeric values and I need to compare them to find out which is larger at any given time.

I think this is done with the function node but writing the code is beyond me and I'm guessing this function has already been written but Google isn't turning up any results.

Can anyone point me in the right direction please

Welcome to the forums!
There are lot's of examples here:

Thank you, but writing the code is beyond me sadly. I was hoping for something I could copy and paste

maybe this thread will help Compare two values to generate a difference value

Many thanks

Thank you for the suggestions but I have figured out how to do it without code by using a change node to place one value into a variable then a switch node to compare that with the the second value


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