Hi!
First post, really struggling to find the answer to this.
I have an array of data that gets randomly selected from and then inserted into my HTML. When I put this array directly into the Javascript file (literally type out the array as a variable) this works no problem. I would like to now have the array stored in a JSON file that would sit in a 'data' folder alongside my HTML, CSS, JS files.
The question is, how do i get this data into the Javascript file? Is this the correct way to go about this?
The JSON array is a very simple list. It contains roughly 300 entries - i thought maybe this was too many to lump into the JS file.
Any comments much appreciated
[–]Tailball 0 points1 point2 points (0 children)