I got stucked!
I use a TopicJson payload:
{"220":"0","XXX":"255","SOC":"98.8","SOH":"82","B-T":"18.14","M-T":"23","Tun":"","kWh":"4.9","Amp":"-0","RPM":"470","Nm ":"-1","FW ":"","C01":"4.11","C02":"4.11","C03":"4.11","C04":"4.11","C05":"4.11","C06":"4.11","C07":"4.12","C08":"4.11","C09":"4.11","C10":"4.11","C11":"4.11","C12":"4.11","C13":"4.11","C14":"4.11","Pac":"57.6","T01":"19","T02":"18","T03":"18","T04":"18","T05":"18","T06":"18","T07":"18","Reg":"","ECO":"","Nor":"","CSt":"0","tAY":"0.00","B12":"13.88","PN1":"1","PN2":"0","KmT":"410666","KmR":"57","KmH":"5.1","SeT":"14","tKT":"282","tKR":"51","tTM":"3298","tKW":"2.7","t10":"9.5","t01":"0.09","tMN":"0.05","tKH":"30.7","kW ":"-0.02","CEt":"","CdK":"","C-T":"40","CKw":"","Min":" 30","T-T":"19.86","Acc":"0.63","AnX":"-2.53","AnY":"-3.78","AnZ":"-36.44"}
where I easily can extract values, like: T07
Node 'Function':
var Inhalt = msg.payload
node.log(typeof Inhalt)
msg.payload = Inhalt.T07
msg.payload = Number(msg.payload)
msg.topic = "BattT07"
return msg;
Result = 18
but if the varialbe name is: C-T , I'm in trouble:
In line 3 a red tile is below T, thus the functions "thinks" T must be deducted from "Inhalt.C" <- which is wrong !
The varaible name is "T-C".
Does someone has an "easy" solution / fix ?
Thanks in advance