I am trying to embed the content of a JSON file data.json into a Single Page Application (SPA). One way to do this is to embed the content directly as data using a script tag, per this link: Embeding Arbitrary JSON.
However, this approach is not perfect in my case, because:
- data.json is 1000+ lines of code;
- data.json is used in several places, including the page in discussion; and I want to keep just one copy of data.json;
I wonder if it's possible to have a pointer in the page to point to the external JSON file?
Note that this question is different from this question.