title: how do I send selected uitableview rows to a newly created group
body: <p>I cannot find any information on this. I want to send my selected rows(ones that have checkmarks) into my firebase database as a newly created group. I have created a "Create group" button outside of my tableview. I would love to have some more information or resources on how to pass data from selected rows but I have not been able to find anything on the topic. I see a lot of information on how to select and deselect a row with a checkmark, but nothing on sending the information from the selected checkmarked rows to an array or an online database in my case.</p>
  
  <pre><code>class FriendsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
  
   var userList = [Users]()
  
  @IBOutlet weak var myTableView: UITableView!
  
  @IBAction func createGroup(_ sender: Any) {
  }
  final let urlString = "https://api.lookfwd.io/v1/test/users"
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
  
      return userList.count
  
  }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let myCell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! MyTableViewCell
      myCell.selectionStyle = UITableViewCellSelectionStyle.none
      myCell.nameLabel.text = userList[indexPath.row].name
      return myCell
  }
  
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      self.downloadJsonWithTask()
  
  }
  
   func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      if myTableView.cellForRow(at: indexPath)?.accessoryType == UITableViewCellAccessoryType.checkmark{
  
          myTableView.cellForRow(at: indexPath)?.accessoryType = UITableViewCellAccessoryType.none}
      else{
          myTableView.cellForRow(at: indexPath)?.accessoryType = UITableViewCellAccessoryType.checkmark
      }
  
              }
  
  
  
  func downloadJsonWithTask() {
  
      let url = NSURL(string: urlString)
  
      var downloadTask = URLRequest(url: (url as URL?)!, cachePolicy: URLRequest.CachePolicy.reloadIgnoringCacheData, timeoutInterval: 20)
  
      downloadTask.httpMethod = "GET"
  
      URLSession.shared.dataTask(with: downloadTask, completionHandler: {(data, response, error) -&gt; Void in
  
          if let response = data {
              if let jsonData = try? JSONSerialization.jsonObject(with: response, options: .allowFragments) as? [String:Any] {
  
                  if let dataArray = (jsonData as AnyObject).value(forKey: "users") as? [[String:Any]] {
                      for data in dataArray{
                          let newUser = Users(data: data)
                          self.userList.append(newUser)
                          print(jsonData!)
                      }
                  }
                  OperationQueue.main.addOperation({
                      for use in self.userList {
                          print(use.name ?? "")
                      }
                      self.myTableView.reloadData()
  
                  })
  
                  print(jsonData!)
              }
          }
      }).resume()
  }
  
  }
  </code></pre>