title: Converting array of objects value into integer value
body: <p>I am new to javascript/typescript. currently have an array of objects</p>
  
  <p>I would like to convert the value to a integer. Currently I am mapping the value by </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var k = [{key: "apples", value:"5"}, {key: "orange", value:"2"}];
  var output = Object.entries(k).map(([key,value]) =&gt; ({key,value}));
  
  console.log(output)</code></pre>
  </div>
  </div>
  </p>
  
  <p>Expected output is</p>
  
  <pre><code>[{key: "apples", value:5}, {key: "orange", value:2}]
  </code></pre>