📅  最后修改于: 2022-03-11 14:48:33.850000             🧑  作者: Mango
Object.keys(obj2).forEach(function(key) {
if (key in obj1) { // or obj1.hasOwnProperty(key)
obj1[key] = obj2[key];
}
});