how to load json file in javascript
// in example.json
{
"name": "testing"
}
// in app.js :
// method 1
const data = require('./example.json');
// method 2: (ES6/ES2015)
import * as data from './example.json';
const { name } = data;
console.log(name); // output 'testing'