Skip to content

Instantly share code, notes, and snippets.

@michaeljcoyne
michaeljcoyne / merge.py
Last active October 7, 2022 19:03 — forked from jcurbelo/merge.py
Merge several metadata JSON files into one
import json
import os
FOLDER = './metadata'
result = []
# read all .json files in the folder
print('Reading files...')
json_files = [f for f in os.listdir(FOLDER) if f.endswith('.json')]
print('Found {} files.'.format(len(json_files)))