{"ScriptPreparationCode":null,"TestCases":[{"Name":"Map","Code":"const arr = [{id: 1}, {id: 2}, {id: 3}, {id: 1}, {id: 2}, {id: 3}, {id: 1}, {id: 2}, {id: 3}];\r\n const uniqs = [];\r\n const map = new Map();\r\n for (const item of arr) {\r\n if (!map.has(item.id)) {\r\n map.set(item.id, item.id);\r\n uniqs.push(item);\r\n }\r\n }\r\n\r\nreturn uniqs;","IsDeferred":false},{"Name":"use lodash","Code":"var l = [{id: 1}, {id: 2}, {id: 3}, {id: 1}, {id: 2}, {id: 3}, {id: 1}, {id: 2}, {id: 3}];\r\nreturn _.uniq(l, \u0027id\u0027);","IsDeferred":false}]}