{"ScriptPreparationCode":"var max = 5000;\r\n\r\nvar arr = [];\r\nfor (let i = 0; i \u003C max; i\u002B\u002B) {\r\n arr.push({ value: i});\r\n // create an occasional duplicate\r\n if (i % 10 === 0) {\r\n arr.push({ value: i});\r\n }\r\n}","TestCases":[{"Name":"Filter","Code":"var duplicates = arr.filter((item, _, items) =\u003E items.find(dupItem =\u003E dupItem.value === item.value));","IsDeferred":false},{"Name":"Group by","Code":"var grouped = _.groupBy(arr, item =\u003E item.value);\r\nvar duplicates1 = _.flatten(_.filter(grouped, group =\u003E group.length \u003E 1));","IsDeferred":false}]}