Create and return json info

PHOTO EMBED

Mon Jul 25 2022 20:56:33 GMT+0000 (Coordinated Universal Time)

Saved by @Ddev #python

import json

# need a function to grab info from a json, 
with open('people.json', 'r') as f:
    data= json.load(f)['people']
    
@app.get("/registers")
def get_data():
    return data
content_copyCOPY

'r': read, f is just no put name I guess that is file