例如,我有这个集合:
[ {
staticProp: "something",
changingProp: [ '1', '2' ] },
{
staticProp: "somethingElse",
changingProp: []
} ]
让我们说id喜欢将它与这个结合起来:
[{
staticProp: "something",
changingProp: [ '3' ]
}]
我的结果是
[ {
staticProp: "something",
changingProp: [ '3' ] },
{
staticProp: "somethingElse",
changingProp: []
} ]
似乎Set.union()保留旧版本。有什么建议吗?