title: Convert json from file to map not working
body: <p>i have this code which gives the error &quot;Error: Uncaught (in promise): TypeError: this.weekMap.get is not a function&quot;. Why weekMap is not recognized as a Map object?</p>
  <pre><code>let weekMap: Map&lt;string, ExerciseDay&gt;;
   let jsonWeekMap =require('./initialWeekMap.json');
    weekMap=jsonWeekMap as Map&lt;string, ExerciseDay&gt;;
    console.log(&quot;week data got:&quot;+weekMap.get(&quot;Monday&quot;))
  </code></pre>
  <p>The Json file contains:</p>
  <pre><code>{
  &quot;Monday&quot;:{
      &quot;englishDayName&quot;:&quot;Monday&quot;,
      &quot;dayNameTranslated&quot;:&quot;Monday&quot;,
      &quot;counter&quot;:0,
      &quot;exerciseList&quot;:[]
  },
  &quot;Tuesday&quot;:{
      &quot;englishDayName&quot;:&quot;Tuesday&quot;,
      &quot;dayNameTranslated&quot;:&quot;Tuesday&quot;,
      &quot;counter&quot;:0,
      &quot;exerciseList&quot;:[]
  },
  &quot;Wednesday&quot;:{
      &quot;englishDayName&quot;:&quot;Wednesday&quot;,
      &quot;dayNameTranslated&quot;:&quot;Wednesday&quot;,
      &quot;counter&quot;:0,
      &quot;exerciseList&quot;:[]
  },
  &quot;Thursday&quot;:{
      &quot;englishDayName&quot;:&quot;Thursday&quot;,
      &quot;dayNameTranslated&quot;:&quot;Thursday&quot;,
      &quot;counter&quot;:0,
      &quot;exerciseList&quot;:[]
  },
  &quot;Friday&quot;:{
      &quot;englishDayName&quot;:&quot;Friday&quot;,
      &quot;dayNameTranslated&quot;:&quot;Friday&quot;,
      &quot;counter&quot;:0,
      &quot;exerciseList&quot;:[]
  },
  &quot;Saturday&quot;:{
      &quot;englishDayName&quot;:&quot;Saturday&quot;,
      &quot;dayNameTranslated&quot;:&quot;Saturday&quot;,
      &quot;counter&quot;:0,
      &quot;exerciseList&quot;:[]
  },
  &quot;Sunday&quot;:{
      &quot;englishDayName&quot;:&quot;Sunday&quot;,
      &quot;dayNameTranslated&quot;:&quot;Sunday&quot;,
      &quot;counter&quot;:0,
      &quot;exerciseList&quot;:[]
  }
  </code></pre>
  <p>}</p>