how to read from a json file code example
Example 1: python read json file
import json
with open('path_to_file/person.json') as f:
data = json.load(f)
print(data)
Example 2: read json file
const fs = require('fs')fs.readFile('./customer.json', 'utf8', (err, jsonString) => { if (err) { console.log("File read failed:", err) return } console.log('File data:', jsonString) })