2021年3月6日星期六

JavaScript Combine two arrays into a new array

I have an array with following structure. Each element has id and value, which is an array of 46. values is composed of date and measurement. What should I do if I want to combine the elements with the same prefix in id names. For example, as the first one and the second one.

The desired sturcture would be

id: Catan values: {date, count, rank}

enter image description here enter image description here

https://stackoverflow.com/questions/66512554/javascript-combine-two-arrays-into-a-new-array March 07, 2021 at 10:03AM

没有评论:

发表评论