{"ScriptPreparationCode":"var max1 = 100000; // 100,000 (100 Thousand)\r\nvar max2 = 10000000; // 10,000,000 (10 Million)\r\nvar max3 = 100000000; // 100,000,000 (100 Million)\r\n\r\nvar arr1 = [];\r\n//for (var i = 0; i \u003C= max1; i\u002B\u002B) { arr1.push(i); }\r\n\r\nvar arr2 = [];\r\nfor (var i = 0; i \u003C= max2; i\u002B\u002B) { arr2.push({name: i, value: Math.floor(Math.random() * 100) }); }\r\n\r\nvar arr3 = [];\r\n//for (var i = 0; i \u003C= max3; i\u002B\u002B) { arr3.push(i); }","TestCases":[{"Name":"Native","Code":"const removeDuplicates = (objects, propertyName) =\u003E {\r\n const uniqueValues = new Set();\r\n\r\n return objects.filter((o) =\u003E {\r\n const isNewValue = !uniqueValues.has(o[propertyName]);\r\n uniqueValues.add(o[propertyName]);\r\n return isNewValue;\r\n });\r\n};\r\n\r\nremoveDuplicates(arr2, \u0027value\u0027)","IsDeferred":false},{"Name":"Lodash.js filter","Code":"const removeDuplicates = (objects, propertyName) =\u003E {\r\n _.uniqBy(objects, propertyName)\r\n};\r\n\r\nremoveDuplicates(arr2, \u0027value\u0027)","IsDeferred":false}]}