Hello all,
I am using OpenWeatherMap node on Node-Red to fetch weather data for my city. But I am trying to use 'if' statement with a function node. But I am not sure if I am actually doing it right as I am not getting any data on debug node. I attempted to use it for my personal understanding by checking the exact temperature and then forming an 'if' statement. For eg:
if ((msg.payload.tempc === "13.3"))
{msg.payload = "Wear a Jacket"}
else msg.payload = msg
return;
But it is wrong. I would actually want for the statement "if the temperature is less than 15, wear a jacket"
Thanks and Regards