I stumbled an issue where I'm working on an HTML file that would load a separate json file. The HTML file have JS code in the <script></script> tag and the json file contains an array with some objects. Both HTML and JSON are stored on my hard drive and my HTML will load using a file path to direct to a file on my PC, not a URL across the internet, to the json file, akin to img src tag using a relative path to an image on my PC.
This video: https://www.youtube.com/watch?v=nx8E5BF0XuE told me that due to the CORS policy made the $.ajax to grab the file stored on his PC, a server is required.
I originally tried doing this before being aware of that video:
(async () => {
const List = await (await fetch("FileWithObjects.json")).json()
})()
If I do not want to use a server as well as node.js, do I HAVE TO have the JSON data in the HTML file itself?

I couldn't find a useful answer online that I could believe so I tried it myself
Instead of a JSON file you need a javascript file that sets a javascript variable to the JSON.
index.htm
The HTML file references a local javascript file via
<script srcscript1.js
This is in the same folder as index.htm
Note this is a javascript file that sets javascript variable
jto the JSON you want.If you open the web page, you'll see a tiny 2 in the top left corner from the static json file
Note that you can only manipulate JSON (or do any non-presentation "computational" things) via javascript. You can't do anything with JSON with HTML alone.
All methods such as
get,fetch,ajaxcan only load data from a "web service", which in turn requires a web server