What I need to do is very simple. I need to set the PV1-2.1 value if the received PV1-18.1 value is in a list of values. I set my variable to an array of those values but the check doesn’t seem to be working
var type = ['YB','ES','EO','SO','CX']
if msg['PV1']['PV1.18']['PV1.18.1'] = type {
msg['PV1']['PV1.2']['PV1.2.1'] = 'V';
}