get local json file js with fetch code example
Example: fetch json file
fetch('http://example.com/movies.json')
.then(response => response.json())
.then(data => console.log(data));
fetch('http://example.com/movies.json')
.then(response => response.json())
.then(data => console.log(data));