Javascript Object merge()
merge()
Object.merge = function () { return [].reduce.call( arguments, function ( ret, merger ) { Object.keys( merger ).forEach(function ( key ) { ret[ key ] = merger[ key ];/* ww w .ja v a2 s .c o m*/ }); return ret; }, {} ); };