rxswift transform observable code example
Example: rxswift map
func transformUsingMap() -> Observable<String> {
return Observable.of(1, 2, 3)
.map { String("\($0)") }
}
func arrayToNewObject(items: [Item]) -> [Data] {
return items.map({ item in
return Data(item)
})
}