Spaces:
Sleeping
Sleeping
File size: 432 Bytes
f96e5ac |
1 2 3 4 5 6 7 8 9 10 11 12 |
import json
def convert_json_to_text(json_path, text_path):
# Read JSON data from file
with open(json_path, 'r') as json_file:
data = json.load(json_file)
# Open a text file for writing
with open(text_path, 'w') as text_file:
for item in data:
# Write only the extracted_content to the text file with a newline character
text_file.write(f"{item['extracted_content']}\n") |