function get (object, path) {
  let value = object

  for (let i = 0; i < path.length && value !== undefined && value !== null; i++) {
    value = value[path[i]]
  }

  return value
}
Get a nested property from an object.
Returns undefined when the property does not exist.
@param {Object} object
@param {string[]} path
@return {*}