following situation: I integrated the "Open weather map" node which delivers current weather information for my location. This information is encoded using different IDs for different weather conditions (i.e. 202 - thunderstorm with heavy rain, 221 - ragged thunderstorm etc.). I´m using a change node to extract this information from the original object and set a corresponding msg.payload.
Now comes the challenge: I would like to use a function node to check whether the weather ID is subset of a defined array of IDs (true) or not (false). I´m sure this is easy Java Script magic but all attempts that I trief failed miserably Some Pros around that can help me with that?
Thanks for the quick answere @Paul-Reed. That probably is an option, but I would need to define a case for every weather condition. Is there not a more easy way where I can define an array of numbers and check the payload against that?