I\'m trying to load a local JSON file but it won\'t work. Here is my JavaScript code (using jQuery):
var json = $.getJSON("test.json"); var data = e
What I did was editing the JSON file little bit.
myfile.json => myfile.js
myfile.json
myfile.js
In the JSON file, (make it a JS variable)
{name: "Whatever"} => var x = {name: "Whatever"}
{name: "Whatever"}
var x = {name: "Whatever"}
At the end,
export default x;
Then,
import JsonObj from './myfile.js';