es2015/utils.js
function getField(object, fieldPath) {
  let currentObject = object
  
  for (let fieldName of fieldPath.split(".")) {
    if (!currentObject.hasOwnProperty(fieldName)) {
      return undefined
    }
    
    currentObject = currentObject[fieldName]
  }
  
  return currentObject
}
function getField(object, fieldPath) {
  let currentObject = object
  
  for (let fieldName of fieldPath.split(".")) {
    if (!currentObject.hasOwnProperty(fieldName)) {
      return undefined
    }
    
    currentObject = currentObject[fieldName]
  }
  
  return currentObject
}
function getField ( object , fieldPath ) { let currentObject = object for ( let fieldName of fieldPath . split ( "." ) ) { if ( ! currentObject . hasOwnProperty ( fieldName ) ) { return undefined } currentObject = currentObject [ fieldName ] } return currentObject }
Returns the value of the field at the specified field path of the provided
object.

@param {Object} object The object from which the field path value should be
extracted.
@param {string} fieldPath The path to the field from which the value should
be returned. The field path must be a sequence of valid ECMAScript
identifiers separated by dots.
@return {*} The value of the field at the specified field path.
Returns the value of the field at the specified field path of the provided object .