# JSON文件读取
# 基本介绍
jsonfile (opens new window)用于读取JSON文件。
# 安装
npm install --save jsonfile
# API
# readFile(filename, [options], callback)
# readFileSync(filename, [options])
const jsonfile = require('jsonfile')
const file = './data.json'
const obj = jsonfile.readFileSync(file)