{"ScriptPreparationCode":"var testCopy = null;\r\nvar testArray = [{\r\n id: 1,\r\n description: \u0027Random description.\u0027,\r\n testDate: new Date(),\r\n testBoolean: true,\r\n testObject: {\r\n testString: \u0027test string\u0027,\r\n testNumber: 12345\r\n },\r\n testArray: [{\r\n myName: \u0027test name\u0027,\r\n myNumber: 123245\r\n }]\r\n},{\r\n id: 2,\r\n description: \u0027Random description.\u0027,\r\n testNumber: 123456789,\r\n testBoolean: true,\r\n testObject: {\r\n testString: \u0027test string\u0027,\r\n testNumber: 12345\r\n },\r\n testArray: [{\r\n myName: \u0027test name\u0027,\r\n myNumber: 123245\r\n }]\r\n}];","TestCases":[{"Name":"Reduce filter","Code":"testCopy = testArray.reduce((accumulator, currentValue) =\u003E {\r\n if(currentValue.id != 2) {\r\n currentValue.description = \u0027test\u0027;\r\n accumulator.push(currentValue);\r\n return accumulator;\r\n }\r\n return accumulator;\r\n},[])","IsDeferred":false},{"Name":"Lodash reduce filter","Code":"testCopy = _.reduce(testArray,(accumulator, currentValue) =\u003E {\r\n if(currentValue.id != 2) {\r\n currentValue.description = \u0027test\u0027;\r\n accumulator.push(currentValue);\r\n return accumulator;\r\n }\r\n return accumulator;\r\n},[]);","IsDeferred":false},{"Name":"Native filter","Code":"testCopy = testArray.filter(o =\u003E {\r\n \tif(o.id != 2) {\r\n o.description = \u0027test\u0027;\r\n return o; \r\n }\r\n});","IsDeferred":false},{"Name":"Lodash filter","Code":"testCopy = _.filter(testArray, function(o) { \r\n\tif(o.id != 2) {\r\n o.description = \u0027test\u0027;\r\n return o; \r\n }\r\n});","IsDeferred":false},{"Name":"Reduce modify ","Code":"testCopy = testArray.reduce((accumulator, currentValue) =\u003E {\r\n if(currentValue.id == 2) {\r\n currentValue.description = \u0027test\u0027;\r\n accumulator.push(currentValue);\r\n return accumulator;\r\n }\r\n return accumulator;\r\n},[])","IsDeferred":false},{"Name":"Map modify","Code":"testCopy = testArray.map((item)=\u003E{\r\n\tif(item.id == 2){\r\n item.description = \u0027test\u0027;\r\n }\r\n return item;\r\n});","IsDeferred":false}]}