update getObjectProperty(msg,expr) to support invalid expression to return undefined instead of crashing
Quick Check
m = {a:{b:{c:{d:{e:"hello"}}}}};
console.log(getMessageProperty(m,"a.b.c.d"))
console.log(getMessageProperty(m,"a.j.c.d"))
{ e: 'hello' }
undefined
instead of with current code
result = ( typeof obj[key] !== "undefined" ? obj[key] : undefined);
^
TypeError: Cannot read property 'c' of undefined
Symptom- Observed that global context would not display in front end, the call returning 400.
Traced to an object in global which cause encodeObject to except.
This push catches that, and now global will display, but the object in question display as an error.