{"ScriptPreparationCode":null,"TestCases":[{"Name":"Using the spread operator","Code":"const firstObject = { sampleData: \u0027Hello world\u0027 }\r\nconst secondObject = { moreData: \u0027foo bar\u0027 }\r\nconst finalObject = {\r\n\t...firstObject,\r\n \t...secondObject\r\n};","IsDeferred":false},{"Name":"Using Object.assign","Code":"const firstObject = { sampleData: \u0027Hello world\u0027 }\r\nconst secondObject = { moreData: \u0027foo bar\u0027 }\r\nconst finalObject = Object.assign(firstObject, secondObject);","IsDeferred":false},{"Name":"Not merging","Code":"const firstObject = { sampleData: \u0027Hello world\u0027 }\r\nconst secondObject = { moreData: \u0027foo bar\u0027 }\r\nconst finalObject = {}\r\nObject.keys(firstObject).forEach(key =\u003E {finalObject[key] = firstObject[key] })\r\nObject.keys(secondObject).forEach(key =\u003E {finalObject[key] = secondObject[key] })\r\n","IsDeferred":false}]}