I'm new to the world of JavaScript/TypeScript and I currently have an array filled with objects.
My goal is to convert the value into an integer. Right now, I am achieving this by using the following mapping method:
var k = [{key: "apples", value:"5"}, {key: "orange", value:"2"}];
var output = Object.entries(k).map(([key,value]) => ({key,value}));
console.log(output)
The desired output would be:
[{key: "apples", value:5}, {key: "orange", value:2}]