{"ScriptPreparationCode":"var data = [\r\n {\r\n value: 1,\r\n metrics: {\r\n metric1: 30,\r\n metric2: 0,\r\n metric3: 0\r\n }\r\n },\r\n {\r\n value: 1,\r\n metrics: {\r\n metric1: 30,\r\n metric2: 0,\r\n metric3: 0\r\n }\r\n },\r\n {\r\n value: 1,\r\n metrics: {\r\n metric1: 30,\r\n metric2: 0,\r\n metric3: 0\r\n }\r\n },\r\n {\r\n value: 1,\r\n metrics: {\r\n metric1: 30,\r\n metric2: 30,\r\n metric3: 0\r\n }\r\n },\r\n {\r\n value: 1,\r\n metrics: {\r\n metric1: 30,\r\n metric2: 0,\r\n metric3: 30\r\n }\r\n },\r\n {\r\n value: 1,\r\n metrics: {\r\n metric1: 30,\r\n metric2: 30,\r\n metric3: 0\r\n }\r\n },\r\n {\r\n value: 1,\r\n metrics: {\r\n metric1: 30,\r\n metric2: 0,\r\n metric3: 30\r\n }\r\n }\r\n]","TestCases":[{"Name":"native reduce","Code":"Object.values(data.reduce((acc, item) =\u003E {\r\n const key = JSON.stringify(item.metrics);\r\n if (acc[key]) return acc;\r\n return { ...acc, [key]: item };\r\n}, {}))","IsDeferred":false},{"Name":"uniqBy","Code":"_.uniqBy(data, item =\u003E JSON.stringify(item.metrics))","IsDeferred":false}]}