{"ScriptPreparationCode":null,"TestCases":[{"Name":"lodash","Code":"const x = [{id: 1}, {id: 1}, {id: 2}, {id: 3}];\r\nconst y = _.uniqBy(x, \u0027id\u0027);\r\nconsole.log(y);","IsDeferred":false},{"Name":"native","Code":"const x = [{id: 1}, {id: 1}, {id: 2}, {id: 3}];\r\nconst y = x.reduce((arr, curr) =\u003E {\r\n const found = arr.find(a =\u003E a.id === curr.id);\r\n if (!found) arr.push(curr);\r\n return arr;\r\n}, []);\r\nconsole.log(y)","IsDeferred":false}]}