function getObjectProperty(msg,expr) {
    var result = null;
    var msgPropParts = normalisePropertyExpression(expr,msg);
    msgPropParts.reduce(function(obj, key) {
        result = (typeof obj[key] !== "undefined" ? obj[key] : undefined);
        return result;
    }, msg);
    return result;
}
Gets a property of an object.

Given the object:

    {
      "pet": {
          "type": "cat"
      }
    }

- `pet.type` will return `"cat"`.
- `pet.name` will return `undefined`
- `car` will return `undefined`
- `car.type` will throw an Error (as `car` does not exist)

@param  {Object} msg - the object
@param  {String} expr - the property expression
@return {any} the object property, or undefined if it does not exist
@throws Will throw an error if the *parent* of the property does not exist
@memberof @node-red/util_util