title: Can't read my JSON file using require method in JS
body: <p>I'm trying to loop through JSON data that I'm pulling from a file. I'm using the require function to get the JSON file but it keeps telling me there is an unexpected '{' token? positions on IDE and console are a little off but I'm pretty sure it's the second objects opening { -position 44-</p>
  <p>Any suggestions?</p>
  <p>myData.json</p>
  <pre><code>{
     &quot;colour&quot; : &quot;blue&quot;,
     &quot;cm&quot;     : 2
  }
  
  {
     &quot;colour&quot; : &quot;red&quot;,
     &quot;cm&quot;     : 5
  }
  </code></pre>
  <p>index.js</p>
  <pre><code>const fileContents = require(&quot;./myData.json&quot;);
  </code></pre>