You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

10 lines
429 B

import json, sys
sys.stdout.reconfigure(encoding='utf-8')
d = json.load(open(r'd:\code\crm-backend-matt\tmp\lanhu_docs_live.json', encoding='utf-8'))
data = json.loads(d['result']['content'][0]['text'])
meta = {k: v for k, v in data.items() if k != 'documents'}
print(json.dumps(meta, ensure_ascii=False, indent=1))
for doc in data.get('documents', []):
print('---')
for k, v in doc.items():
print(f' {k}: {v}')