{"ScriptPreparationCode":"var arr = [];\r\nvar object1 = { \r\n\tpropa: {\r\n a: 1,\r\n b: 1\r\n },\r\n\tpropb: {\r\n a: 1,\r\n b: 1\r\n },\r\n\tpropc: {\r\n a: 1,\r\n b: 1\r\n }\r\n};\r\n\r\nvar object2 = { \r\n\tpropa: {\r\n a: 1,\r\n d: 1\r\n },\r\n\tpropb: {\r\n a: 1,\r\n d: 1\r\n },\r\n\tpropd: {\r\n a: 1,\r\n d: 1\r\n }\r\n};\r\n\r\nfor (var i = 0; i \u003C= 100000; i\u002B\u002B) { arr.push({ object1, object2 }); }","TestCases":[{"Name":"Lodash extend","Code":"arr.map(function (element) {\r\n const { object1, object2 } = element;\r\n let results = {};\r\n [object1, object2].forEach(elem =\u003E {\r\n for (const propy in elem) {\r\n \tresults[propy] = _.extend({}, elem[propy], results[propy]);\r\n }\r\n });\r\n});","IsDeferred":false},{"Name":"Object.assign","Code":"arr.map(function (element) {\r\n const { object1, object2 } = element;\r\n let results = {};\r\n [object1, object2].forEach(elem =\u003E {\r\n for (const propy in elem) {\r\n \tif (!results[propy]) {\r\n \tresults[propy] = {};\r\n }\r\n Object.assign(results[propy], elem[propy]);\r\n }\r\n });\r\n});","IsDeferred":false},{"Name":"With ...","Code":"arr.map(function (element) {\r\n const { object1, object2 } = element;\r\n let results = {};\r\n [object1, object2].forEach(elem =\u003E {\r\n for (const propy in elem) {\r\n \tif (!results[propy]) {\r\n \tresults[propy] = {};\r\n }\r\n results[propy] = { ...results[propy], ...elem[propy] };\r\n }\r\n });\r\n});","IsDeferred":false}]}