{"ScriptPreparationCode":"\r\nfunction _Utils_update(oldRecord, updatedFields)\r\n{\r\n\tvar newRecord = {};\r\n\r\n\tfor (var key in oldRecord)\r\n\t{\r\n\t\tnewRecord[key] = oldRecord[key];\r\n\t}\r\n\r\n\tfor (var key in updatedFields)\r\n\t{\r\n\t\tnewRecord[key] = updatedFields[key];\r\n\t}\r\n\r\n\treturn newRecord;\r\n}","TestCases":[{"Name":"Using the spread operator","Code":"const firstObject = { sampleData: \u0027Hello world\u0027, moreData: \u0027foo bar\u0027 }\r\nconst secondObject = { moreData: \u0027foo bar\u0027 }\r\n\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, moreData: \u0027foo bar\u0027 }\r\nconst secondObject = { moreData: \u0027foo bar\u0027 }\r\n\r\nconst finalObject = Object.assign({}, firstObject, secondObject);","IsDeferred":false},{"Name":"Current Elm Update","Code":"const firstObject = { sampleData: \u0027Hello world\u0027, moreData: \u0027foo bar\u0027 }\r\nconst secondObject = { moreData: \u0027foo bar\u0027 }\r\n\r\nconst finalObject = _Utils_update(firstObject, secondObject);\r\n\r\n","IsDeferred":false},{"Name":"Inline copying","Code":"const firstObject = { sampleData: \u0027Hello world\u0027, moreData: \u0027foo bar\u0027 }\r\nconst secondObject = { moreData: \u0027foo bar\u0027 }\r\n\r\nconst finalObject = {sampleData: firstObject.sampleData, moreData: secondObject.moreData }\r\n","IsDeferred":false}]}