{"ScriptPreparationCode":null,"TestCases":[{"Name":"Using the spread operator","Code":"const returnValue = {};\r\nconst obj = { \r\n SampleData: \u0027Hello world\u0027,\r\n MoreData: \u0027foo bar\u0027,\r\n SampleData1: \u0027Hello world\u0027,\r\n MoreData1: \u0027foo bar\u0027,\r\n SampleData2: \u0027Hello world\u0027,\r\n MoreData2: \u0027foo bar\u0027,\r\n SampleData3: \u0027Hello world\u0027,\r\n MoreData3: \u0027foo bar\u0027,\r\n SampleData4: \u0027Hello world\u0027,\r\n MoreData4: \u0027foo bar\u0027,\r\n SampleData5: \u0027Hello world\u0027,\r\n MoreData5: \u0027foo bar\u0027,\r\n SampleData6: \u0027Hello world\u0027,\r\n MoreData6: \u0027foo bar\u0027,\r\n SampleData7: \u0027Hello world\u0027,\r\n MoreData7: \u0027foo bar\u0027,\r\n SampleData8: \u0027Hello world\u0027,\r\n MoreData8: \u0027foo bar\u0027,\r\n SampleData9: \u0027Hello world\u0027,\r\n MoreData9: \u0027foo bar\u0027,\r\n SampleData0: \u0027Hello world\u0027,\r\n MoreData0: \u0027foo bar\u0027,\r\n };\r\n\r\nfor (const key in obj) {\r\n if (_.has(obj, key)) {\r\n returnValue[key.charAt(0).toLowerCase() \u002B key.slice(1)] = obj[key];\r\n }\r\n}","IsDeferred":false},{"Name":"Using Object.assign","Code":"const returnValue = {};\r\nconst obj = { \r\n SampleData: \u0027Hello world\u0027,\r\n MoreData: \u0027foo bar\u0027,\r\n SampleData1: \u0027Hello world\u0027,\r\n MoreData1: \u0027foo bar\u0027,\r\n SampleData2: \u0027Hello world\u0027,\r\n MoreData2: \u0027foo bar\u0027,\r\n SampleData3: \u0027Hello world\u0027,\r\n MoreData3: \u0027foo bar\u0027,\r\n SampleData4: \u0027Hello world\u0027,\r\n MoreData4: \u0027foo bar\u0027,\r\n SampleData5: \u0027Hello world\u0027,\r\n MoreData5: \u0027foo bar\u0027,\r\n SampleData6: \u0027Hello world\u0027,\r\n MoreData6: \u0027foo bar\u0027,\r\n SampleData7: \u0027Hello world\u0027,\r\n MoreData7: \u0027foo bar\u0027,\r\n SampleData8: \u0027Hello world\u0027,\r\n MoreData8: \u0027foo bar\u0027,\r\n SampleData9: \u0027Hello world\u0027,\r\n MoreData9: \u0027foo bar\u0027,\r\n SampleData0: \u0027Hello world\u0027,\r\n MoreData0: \u0027foo bar\u0027,\r\n };\r\n\r\nfor (const key in obj) {\r\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n returnValue[key[0].toLowerCase() \u002B key.slice(1)] = obj[key];\r\n }\r\n}","IsDeferred":false}]}