code: function applyPath(path, jsonBody, isNot) {
    // TODO input validation
    // * path cannot end in '.'
    // * path cannot be ''
    // * path cannot have more than one '*'/'?'
    // * path cannot start with ? or * and have more stuff after
  
    // states the last option in the path
    let lastOption
  
    // split up the path by '.'
    const pathSegments = path.split('.')
    // temporarially store the last option
    const tmpLast = pathSegments[pathSegments.length - 1]
    // if the last option is not a '*' or '?', set it to unefined as the developer didn't specify one
    if ('*' === tmpLast || '?' === tmpLast) {
      lastOption = tmpLast
    }
  
    try {
      // break apart the path and iterate through the keys to traverse through the JSON object
      pathSegments.forEach(segment => {
        // if the next 'segment' isn't actually a special character, traverse through the object
        if ('*' !== segment && '?' !== segment) {
          jsonBody = jsonBody[segment]
        }
      })
    } catch (e) {
      if (!isNot) {
        throw e
      } else {
        console.warn(
          "[IcedFrisby] You attempted to traverse through an object with a path ('" +
            path +
            "') that did not exist in the object. \
  This issue was suppressed because you specified the isNot option. This behavior is usually considered an anti-pattern. Use a schema check instead."
        )
      }
    }
  
    return { lastOption, jsonBody }
  }
docs: applies a path traversal by navigating through the jsonBody returns an object containing the last option specified in the path (*, ? or undefined) and the traversed json body