{"ScriptPreparationCode":"var workOrders = _.range(_.random(100)).map(x =\u003E ({\r\n assignee: {\r\n id: _.random(1, 10),\r\n },\r\n}));","TestCases":[{"Name":"Array.prototype.reduce()","Code":"workOrders.reduce((accumulator, workOrder) =\u003E {\r\n if (workOrder.assignee === null) {\r\n return accumulator;\r\n }\r\n const assigneeExists = accumulator[1].has(workOrder.assignee.id);\r\n if (assigneeExists) return accumulator;\r\n accumulator[1].add(workOrder.assignee.id);\r\n accumulator[0].push(workOrder.assignee);\r\n return accumulator;\r\n}, [[], new Set()]);","IsDeferred":false},{"Name":"_.uniqBy","Code":"_(workOrders).map(\u0027assignee\u0027).filter().uniqBy(\u0027id\u0027).value();","IsDeferred":false}]}