import json


def load_list(file):
    """Load an array from a file.

    Args:
        file (str or file-like object): the name of the file, or a file-like object.
    
    Returns:
        array (list): the list
    """

    if isinstance(file, str):
        with open(file, "r") as f:
            data = json.load(f)
    else:
        data = json.load(file)

    return data["list"]