Ramda recommendation for removing duplicates from a slightly nested array
问题 We're trying to utilise Ramda to avoid some brute-force programming. We have an array of objects that can look like this: [ {id: "001", failedReason: [1000]}, {id: "001", failedReason: [1001]}, {id: "001", failedReason: [1002]}, {id: "001", failedReason: [1000]}, {id: "001", failedReason: [1000, 1003]}, {id: "002", failedReason: [1000]} ] and we'd like to transform it so that it looks like this: [ {id: "001", failedReason: [1000, 1001, 1002, 1003]}, {id: "002", failedReason: [1000]} ]