title: Swift UITableView with a datasouce of different data types
body: <p>From the JSON file, I create a model. It has several different types.
  In my view I have a segmentedControl, where user can choose a type and filter the <code>tableView</code> accordingly.</p>
  <pre><code>private enum Section {
      case all(???)
      case case1(items: [type1])
      case case2(items: [type2])
      case case3(items: [type3])
  }
  
      switch section {
      case .type1(let items):
          setupCell(items)
      case .type2(let items):
          setupCell(items)
      case .type3(let items):
          setupCell(items)
      }
  </code></pre>
  <p>The problem appears if I want to have a segment All and show all 3 types together. It means I would have an array of type <code>Any [type1, type2, type3]</code> and need to cast every type.
  What would be the be approach to handle this use-case? Create a protocol that every type should conform? Is there some better approach?</p>