Oldobject = {'name':'Joe','age':12};
newObject = {'address':'XXX'};
我想得到如下结果:
{'name':'Joe','age':12,'address':'XXX' }
我用
Oldobject.address = newObject
有什么优雅的方法可以做到这一点吗?
Oldobject = {'name':'Joe','age':12};
newObject = {'address':'XXX'};
我想得到如下结果:
{'name':'Joe','age':12,'address':'XXX' }
我用
Oldobject.address = newObject
有什么优雅的方法可以做到这一点吗?