I have two multidimensional arrays where I would like to add the two together into one multidimensional array. Both arrays have 365 sets of two values. The first value of each set would match and I need the second value to be added. I also need to account for null values. Basically:
If you 100% sure that first value would always match, then .map() is your go-to method - map through every element of arr1 adding element with corresponding index from arr2 (casting values to Number as you go)
*If first value is unique you can treat it as a key and perform Object.fromEntries() method on arr2 and then map it like this: