def get_value(path, obj):
    """Returns the value of key in a nested data structure

    :param path: The path to the value to be returned
    :type path: str

    :param obj: Source of the data to return a value from
    :type obj: obj

    :return: Value based on the path or None
    :rtype: object
    """
    try:
        path = path.split('.')
        for item in path:
            try:
                item = int(item)
            except ValueError:
                pass
            obj = obj[item]
        return obj
    except KeyError:
        return None