import json file javascript

JavaScript
// if you're using node.js, you can use require(.json):
// in list.json:
[{"name":"John","age":"17"},{"name":"Jack","age":"36"},{"name":"Rick","age":"76"}]

//in js
const list = require( 'list.json' );
console.log(list);
// output:
// 0: Name: "John", Age: "17"
// 1: Name: "Jack", Age: "36"
// 2: Name: "Rick", Age: "76"
Source

Also in JavaScript: