title: How to import JSON file to javascript array
body: <p>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</p>
  
  <pre><code>var subjects = require('./models/courses.json');
  </code></pre>
  
  <p>When I console.log this, it throws an error</p>
  
  <pre><code>Unexpected token , in JSON at position 52
  </code></pre>
  
  <p>I basically just want to be able to make subjects store an array of json objects.</p>
  
  <p>Here is my json file</p>
  
  <pre><code>{"id" : "AAFS",   "department" : "Africana Studies"},
  {"id" : "AANT",   "department" : "Anthropology"},
  {"id" : "AARA",   "department" : "Arabic"},
  {"id" : "AARH",   "department" : "Art History"},
  {"id" : "AART",   "department" : "Art"}
  </code></pre>