_getEscaped = (rootObject, pathArray, defValue) => {
    if (!(pathArray instanceof Array)) {
      return null;
    }

    if (rootObject === undefined) {
      return defValue;
    }

    if (_.isEmpty(pathArray)) {
      return rootObject;
    }

    return _getEscaped(rootObject[pathArray.shift()], pathArray, defValue);
  }
@param {*} rootObject - the object from which you're trying to read a property
@param {*} pathArray - each element in this array a property of the previous object
@param {*} defValue - what to return if the required path is not found
@returns {*} - required property value
@description - this is similar to _.get(rootObject, pathArray.join('.')), but also works for cases where
there's a . in the property name