title: import * as x versus import x for a json object
body: <p>I reused some code that referenced an object in a .json file. The .json file was as follows:</p>
  
  <pre><code>{
    "a": {
      "b": "Hello world"
    }
  }
  </code></pre>
  
  <p>The original code referenced it as follows:</p>
  
  <pre><code>import * as newObj from "./test.json"
  </code></pre>
  
  <p>This didn't create the object correctly (although, it strangely ran perfectly in the original application". Changing it to the following worked:</p>
  
  <pre><code>import newObj from "./test.json"
  </code></pre>
  
  <p>Could anyone shed some light on how these two imports would differ, and possibly why it worked in the original form in one app, but needed to be changed in the second?</p>
  
  <p>I have seen some answers around "import x vs import * as x" - but this question pertains specifically to how a json object is structured when imported in these 2 different ways.</p>