def flatten_json(dictionary: dict) -> dict:
    'Flatten a nested json file'
    while True:
        dictionary = dict(chain.from_iterable(starmap(_unpack, dictionary.items())))
        if _atomic_values(dictionary):
            break
    return dictionary
Flatten a nested json file
def flatten_json(dictionary: dict) -> dict:
    
    while True:
        dictionary = dict(chain.from_iterable(starmap(_unpack, dictionary.items())))
        if _atomic_values(dictionary):
            break
    return dictionary