def METHOD_NAME(object, path, defaultValue=None):
    if object is None:
        return defaultValue
    if isinstance(path, str):
        path = path.split("/")
    else:
        try:
            # Check if path is iterable...
            path = iter(path)
        except TypeError:
            path = [path]
    temp = object
    for key in path:
        temp = temp.get(key, None)
        if temp is None:
            return defaultValue
    return temp