现有的word文件格式如下

我想转换成格式如下的JSON文件:

在网上找了相关的代码都无法实现,自己又不会更改代码,可以帮忙指点迷津改一下代码吗OVO
以下是网上找到的代码:
import docx
import re
import json
#打开docx文件
file = docx.Document("E:\Edge下载/1647846133302.docx")
list = []
val = None
#进行每段的操作
for para in file.paragraphs:
v = para.text.split()
#每行进行操作
for line in v:
items = re.compile("\.").split(line)
if (re.match('\d', line)):
if len(items) > 1:
val = {'no': items[0]}
q = ''.join([str(x) for x in items[1:]])
key = re.search('(?<=(\(|())\s*[A-D]*', q)
if key != None:
val['k'] = key.group(0).lstrip()
val['q'] = re.sub('(?<=(\(|())\s*[A-D]*\s*', ' ', q)
list.append(val)
if (re.match('A', line)):
if len(items) > 1:
val['a'] = ''.join([str(x) for x in items[1:]])
if (re.match('B', line)):
if len(items) > 1:
val['b'] = ''.join([str(x) for x in items[1:]])
if (re.match('C', line)):
if len(items) > 1:
val['c'] = ''.join([str(x) for x in items[1:]])
if (re.match('D', line)):
if len(items) > 1:
val['d'] = ''.join([str(x) for x in items[1:]])
with open('data.json', 'w') as outfile:
json.dump(list, outfile, ensure_ascii=False)