Im trying to convert a "simple" array that looks like this:
arr = [143.17, 174.45, 55.3]
To an array of objects in this format:
Today = new Date();
newArr = [
{ key: Today, value: 143.17 },
{ key: Today + 1, value: 174.45 },
{ key: Today + 2, value: 55.3}]
Im hoping to create a function to which I can pass the original array and have it return the new one:
objArr = function CreateObjArr(arr){
return newArr
}
Thank you
{ day1: 1.2, day2: 1.1, day3: 1.4 }.