{"ScriptPreparationCode":"const combined = [\r\n {oclcNumber: 1},\r\n {oclcNumber: 2},\r\n {oclcNumber: 3},\r\n {oclcNumber: 4},\r\n {oclcNumber: 5},\r\n {oclcNumber: 6},\r\n {oclcNumber: 7},\r\n {oclcNumber: 8},\r\n {oclcNumber: 9},\r\n {oclcNumber: 10},\r\n {oclcNumber: 2},\r\n]","TestCases":[{"Name":"using reduce function","Code":"const combined = [\r\n {oclcNumber: 1},\r\n {oclcNumber: 2},\r\n {oclcNumber: 3},\r\n {oclcNumber: 4},\r\n {oclcNumber: 5},\r\n {oclcNumber: 6},\r\n {oclcNumber: 7},\r\n {oclcNumber: 8},\r\n {oclcNumber: 9},\r\n {oclcNumber: 10},\r\n {oclcNumber: 2},\r\n]\r\n\r\ncombined.reduce((acc, current) =\u003E {\r\n return (acc.find(record =\u003E record.oclcNumber === current.oclcNumber) ? acc : acc.concat(current))\r\n}, [])","IsDeferred":false},{"Name":"using filter function","Code":"const combined = [\r\n {oclcNumber: 1},\r\n {oclcNumber: 2},\r\n {oclcNumber: 3},\r\n {oclcNumber: 4},\r\n {oclcNumber: 5},\r\n {oclcNumber: 6},\r\n {oclcNumber: 7},\r\n {oclcNumber: 8},\r\n {oclcNumber: 9},\r\n {oclcNumber: 10},\r\n {oclcNumber: 2},\r\n]\r\n\r\ncombined.filter((current, i, arr) =\u003E {\r\n return arr.findIndex(record =\u003E (record.oclcNumber === current.oclcNumber)) === i\r\n})","IsDeferred":false}]}