import json


def json_dump(data, path, **kwargs):
    """Export JSON file.

    Args:
        data (dict): Dictionary to export as JSON
        path (str): JSON file path to save data
        kwargs (dict): Any extra flags to pass in the :func:`json.dump` command

    Returns:
        str: given file path
    """
    with open(path, "w") as _file:
        json.dump(data, _file, **kwargs)

    return path