Concatenation inside formatting

msg.payload[VTS + "VC1"] = k[1];
or
msg.payload = {[VTS + "VC1"]: k[1]};

one adds a property to payload, the other over writes payload.
[edit] I would add that a property name with a . in may cause issues later on, so might be better to avoid this.

1 Like