I am working on a node project that needs a list of JSON objects. At first, I copy and pasted the entire list of JSON into the main app.js file but clearly that isn't conventional. I made a new json file with all the objects I need in my models folder and am accessing it like this
var subjects = require('./models/courses.json');
When I console.log this, it throws an error
Unexpected token , in JSON at position 52
I basically just want to be able to make subjects store an array of json objects.
Here is my json file
{"id" : "AAFS", "department" : "Africana Studies"},
{"id" : "AANT", "department" : "Anthropology"},
{"id" : "AARA", "department" : "Arabic"},
{"id" : "AARH", "department" : "Art History"},
{"id" : "AART", "department" : "Art"}
fsfunctions.JSON.stringify.