title: Typescript error:Object.fromEntries typescript Error
body: <p>I have a function in typescript which uses Object.fromEntries to reduce a complex response object and group it using substring of the child object key.</p>
  
  <pre><code>let Newresult = res.map(object =&gt; Object.fromEntries(Object.entries(object).map(([key, value]) =&gt; [
  key,
  value.map(valueobject =&gt; Object.entries(valueobject).reduce((res1, [name, value]) =&gt; {
      const key = name.slice(0, 5);
      res1[key] = res1[key] || {};
      res[key][name] = value;
      return res1;
  }, {}))
  ])));
  </code></pre>
  
  <p>but the problem is typescript throws below error while compiling.</p>
  
  <pre><code>error TS2339: Property 'fromEntries' does not exist on type 'ObjectConstructor'.
  error TS2339: Property 'map' does not exist on type '{}'.
  </code></pre>
  
  <p>I tried adding ESNext,ES2017.Object into my tsconfig.json lib-array but still its throwing compilation error.
  but the same updates for my lib-array is allowing me to use Object.entries.</p>
  
  <p>I am using angular -v-6, typescript:~3.1.1</p>
  
  <p>which other method can help me achieve the same result as above.
  can somebody direct me in right direction?</p>
  
  <p>Thanks in advance!!</p>