I am encountering an Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
let mydata = JSON.parse("file.json");
console.log(myJSON)
Here is a sample of the JSON file's data:
[[1,1,0,1,1,0,0,0,1,1,1,1,1,1],
[1,0,0,1,1,0,0,0,1,1,1,1,1,0],
[1,0,0,1,1,0,1,1,1,1,1,1,1,1],
[1,0,0,1,1,0,0,0,1,1,1,1,1,0], .... etc]
What is the best way to retrieve data from this JSON file using JavaScript?
Is it acceptable to structure a JSON in this format?
Upon opening the file in a browser, it appears to be well-formatted as a JSON array.