The code that handles all the creation of files and folders is listed below.
for i in range(10):
for j in range(5):
p = Path("data", f"folder-{i}", f"file-{j}.json")
if not p.parent.exists():
p.parent.mkdir()
p.write_text(create_json(i * j))