calllistApi minus in variable name causes issues
Hi,
if I'm using the calllistApi and gets an update form it is causes an issue with the minus in the var name for example
call-duration
I'm using this code to debug in incoming messages;
calllistApi.onmessage.attach(function (sender, obj) {
if (obj.msg.mt == "Update") {
console.log("calllistApi_onmessage: " + obj.msg.entries[0].time);
console.log("calllistApi_onmessage: " + obj.msg.entries[0].call-duration);//mach probleme wegen dem - im Namen
}
});
if (obj.msg.mt == "Update") {
console.log("calllistApi_onmessage: " + obj.msg.entries[0].time);
console.log("calllistApi_onmessage: " + obj.msg.entries[0].call-duration);//mach probleme wegen dem - im Namen
}
});
but the minus in call-duration will be interpreted as an minus sign for calculation and gives me this error: