I need some advice on the most effective method for retrieving external JSON data.
Currently, I am using browserify and importing JSON data like this:
const data = require('mydata.json')
.
However, I want to avoid having to recompile the browserify JavaScript file every time the JSON data is updated. I am exploring the idea of having browserify fetch the JSON data from an external source, allowing me to simply update the JSON file.
Another option I am considering is using getJSON()
to retrieve the external JSON file, although I have reservations about the efficiency of this method.
If anyone has a better suggestion, I would greatly appreciate it. Thank you.