title: RxSwift create multiple Observable from One
body: <p>how can I share one API call? For example, I have the following Model class. The properties will bind to different UI components.  I am implementing this in the ViewController. But, I think I should not expose the Model to the View layer. Instead, I should give the ViewController two Observable properties to bind. One is for UITextField, the other is for the UITableView. So, how should I create more than one Observable from an Observable?</p>
  
  <pre><code>struct CustomerListJSON : Codable {
      var UserCount:Int?
      var TotalReward:Int?
      var CurMonthUserCount:Int?
      var CurMonthTotalReward:Int?
      var CurYearUserCount:Int?
      var CurYearTotalReward:Int?
      var UserList:[CustomerJSON]?
  }
  
  let getSummery = self.viewModel.getSummery()
  
  getSummery.flatMap{ [weak self](summery) -&gt;  Observable&lt;[CustomerJSON]&gt; in
  
  //Label datesource
              self?.summeryLabel.text = " \(summery.UserCount ?? 0)\t \(summery.TotalReward ?? 0)\n \(summery.CurMonthUserCount ?? 0)\t \(summery.CurMonthTotalReward ?? 0)\n \(summery.CurYearUserCount ?? 0)\t\(summery.CurYearTotalReward ?? 0)"
  
              return Observable.of(summery.UserList ?? [])
  //Table datasource
          }.bind(to: self.tableView.rx.items(cellIdentifier: "customerCell", cellType: UITableViewCell.self)){ (index, customer, cell) in
              cell.textLabel?.text = "\(customer.UserName ?? "")\t\t\(customer.CreateTime ?? "")"
          }.disposed(by: rx.disposeBag)
  </code></pre>