{"ScriptPreparationCode":"var data = [{a: 1}, {a: 2}, {a: 3}, {a: 4}, {a: 5}, {a: 6}, {a: 7}, {a: 8}, {a: 1}];","TestCases":[{"Name":"lodash uniq","Code":"_.uniqBy(data, \u0027a\u0027);","IsDeferred":false},{"Name":"es6 map","Code":"const uniqBy = (arr, predicate) =\u003E {\r\n const cb = typeof predicate === \u0027function\u0027 ? predicate : (o) =\u003E o[predicate];\r\n \r\n return [...arr.reduce((map, item) =\u003E {\r\n const key = (item === null || item === undefined) ? \r\n item : cb(item);\r\n \r\n map.has(key) || map.set(key, item);\r\n \r\n return map;\r\n }, new Map()).values()];\r\n};\r\n\r\nuniqBy(data, \u0027a\u0027)","IsDeferred":false}]}