{"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.some(assignee =\u003E assignee.id === workOrder.assignee.id);\r\n return assigneeExists === true ? accumulator : [...accumulator, workOrder.assignee];\r\n}, []);","IsDeferred":false},{"Name":"_.uniqBy","Code":"_(workOrders).map(\u0027assignee\u0027).filter().uniqBy(\u0027id\u0027).value();","IsDeferred":false}]}