import pathlib
import json


def dump_storage_index(output, indexes):
    """Dump storage indexes into a JSON file
    
    Parameters
    ----------
    output: str
    indexes: dict(str=dict)
    """
    filename = pathlib.Path(output) / "storage.json"
    with open(filename, "w") as f:
        json.dump(indexes, f, indent=2)
    return filename