Reputation: 65
I have one Observable<[String]>, how do I map it to Another Observable < Dash > where
Class Dash{
var list :[String]
var count :int
}
for simplicity count is any random integer .
Upvotes: 0
Views: 257
Reputation: 33967
How would you do it if you weren't using Rx? I mean given this:
func convert(texts: [String]) -> Dash {
// what would you put here?
}
You do the exact same thing in the Observable map closure that you would do in the above function.
Upvotes: 1