在不以任何方式修改 arr 的情况下混合 from extra
into的值的最有效方法是什么?使用:plain javascript、下划线、lodash(下划线兼容)、jquery 或 lodash,按优先顺序排列。arr
result
arr = [
{name: "A"},
{name: "B"},
{name: "C"},
]
.
extra = {
"B": value1
"C": value2
}
.
result == [
{name: "A"},
{name: "B", extra: value1},
{name: "C", extra: value2},
]
// true !