def json2txt(path):
    out_path = out_path = os.path.join(txt_path, (path.split('.')[0] + '.txt'))
    with open(out_path, 'w+') as out:
        with open(json_path, 'r+') as f:
            caption_dict = json.load(f)
            for content_dict in caption_dict['body']:
                out.write((content_dict['content'] + '\n'))
def json2txt(path):
    out_path = out_path = os.path.join(txt_path, (path.split('.')[0] + '.txt'))
    with open(out_path, 'w+') as out:
        with open(json_path, 'r+') as f:
            caption_dict = json.load(f)
            for content_dict in caption_dict['body']:
                out.write((content_dict['content'] + '\n'))