I have a JSON array saved to its own file, gamedata.json. If this were instead just a regular array of objects like gamedata.js loaded into my HTML, I could just give the array a name var gameObjects = array [{lots of objects}];
and then if I wanted to look through the array I could just reference gameObjects, even from other JS files loaded into the same HTML page.
But since this is a JSON file, how can I reference it? This is my first time working with JSON but I learned that I can't set the array to a variable in the .json file. So how can I get access to it's data from other JS files?
I can use VanillaJS or jQuery, its a large array, around 13000 lines, so efficiency matters.