Reputation: 4358
Consider the following arrays
let a = [1,2,3,4,5,6]
let b = [5,6,7,8,9]
How to get c, where c = [1,2,3,4,5,6,7,8,9]
?
In RxSwift, how to do merge, sort, and removing duplicate for the input arrays?
Upvotes: 1
Views: 806
Reputation: 93151
Everything you need is provided by the Core Library:
let c = Set(a + b).sorted()
Upvotes: 5