Hi all! I’ve just starting putting together my first node red project but and stuck.
I managed to make an api call and extracted the data I want but it’s in an abbreviated form.
I want to convert it to a string base on this array? But have no idea how to do it (no programming background)
I’ve looked through all the examples and tutorials and I’m guessing I’ve to use a function node but am getting nowhere.
How do I get an incoming msg payload eg. FG to convert it to the corresponding FOG base on the below?
{
'BR': 'Mist',
'CL': 'Cloudy',
'DR': 'Drizzle',
'FA': 'Fair',
'FG': 'Fog',
'FN': 'Fair (Night)',
'FW': 'Fair & Warm',
'HG': 'Heavy Thundery Showers with Gusty Winds',
'HR': 'Heavy Rain',
'HS': 'Heavy Showers',
'HT': 'Heavy Thundery Showers',
'HZ': 'Hazy',
'LH': 'Slightly Hazy',
'LR': 'Light Rain',
'LS': 'Light Showers',
'OC': 'Overcast',
'PC': 'Partly Cloudy',
'PN': 'Partly Cloudy (Night)',
'PS': 'Passing Showers',
'RA': 'Moderate Rain',
'SH': 'Showers',
'SK': 'Strong Winds, Showers',
'SN': 'Snow',
'SR': 'Strong Winds, Rain',
'SS': 'Snow Showers',
'SU': 'Sunny',
'SW': 'Strong Winds',
'TL': 'Thundery Showers',
'WC': 'Windy, Cloudy',
'WD': 'Windy',
'WF': 'Windy, Fair',
'WR': 'Windy, Rain',
'WS': 'Windy, Showers',
}