{"ScriptPreparationCode":"var data = Array(10000).fill(null).map((x, i) =\u003E ({ x: i }));","TestCases":[{"Name":"Index method","Code":"var index = {};\r\nvar arr = [];\r\n\r\ndata.forEach((x) =\u003E {\r\n if (!x.x in index) {\r\n arr.push(x);\r\n index[x.x] = arr.length - 1;\r\n }\r\n});","IsDeferred":false},{"Name":"Object method","Code":"var indexedObject = data.reduce((acc, x) =\u003E {\r\n if (!x.x in acc) acc[x.x] = x;\r\n return acc;\r\n}, {});\r\n\r\nvar arr = Object.values(indexedObject);","IsDeferred":false}]}