On the problem of object merging

The values of

name are looped out in the background, and I added them to the object, and now the question is, how can I merge these two objects together, or add both of them to the same array? Because I take the value outside the loop, the value taken out each time is the key=2569 data

Mar.11,2021

define a new array, then put these two push in, and cycle


you can only get the last value,
because they point to the same address,
so each time the old object is overwritten by the new object.

Menu