title: Firebase import array data to tableview
body: <p>I have tableview in VC and I would like  to import "Detail" item form current recipe:</p>
  
  <p><a href="https://i.stack.imgur.com/H6E9Y.png" rel="nofollow noreferrer">Firebase entries</a></p>
  
  <p>to tableView - each to a separate cell.</p>
  
  <p><strong>My Code in RecipiesModel:</strong></p>
  
  <pre><code>class RecipiesModel {
  
      var title: String?
      var desc: String?
      var detail: Array&lt;Any&gt;?
  
      init(title: String?, desc: String?, detail: Array&lt;Any&gt;?){
          self.title = title
          self.desc = desc
          self.detail = detail
      }
  }
  </code></pre>
  
  <p><strong>My Code in VC:</strong></p>
  
  <pre><code>import UIKit
  import FirebaseDatabase
  
  class DescriptionViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
  
      var textInput: String = ""
      var descInput: String = ""
  
      var ref:DatabaseReference!
      var recipiesList = [RecipiesModel]()
  
      @IBOutlet weak var tableView: UITableView!
      @IBOutlet weak var titleLabelDesc: UILabel!
      @IBOutlet weak var descriptionLabelDesc: UILabel!
      @IBOutlet weak var imageView: UIImageView!
      @IBOutlet weak var tabBarView: UIView!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          UIApplication.shared.statusBarStyle = .lightContent
  
          tableView.delegate = self
          tableView.dataSource = self
  
          customUIView()
  
          titleLabelDesc.text = textInput
          descriptionLabelDesc.text = descInput
  
          loadList()
      }
  
      //Database
  
      func loadList() {
          ref = Database.database().reference()
          ref.child("Recipies").observe(.childAdded, with: { (snapshot) in
              let results = snapshot.value as? [String : AnyObject]
              let title = results?["Recipies title"]
              let desc = results?["Recipies description"]
              let detail = results?["Detail"]
              let myRecipies = RecipiesModel(title: title as! String?, desc: desc as! String?, detail: detail as! Array&lt;Any&gt;?)
              self.recipiesList.append(myRecipies)
  
              DispatchQueue.main.async {
                  self.tableView.reloadData()
              }
          })
      }
  
      func customUIView() {
          tabBarView.layer.shadowColor = UIColor.lightGray.cgColor
          tabBarView.layer.shadowOpacity = 1
          tabBarView.layer.shadowOffset = CGSize.zero
          tabBarView.layer.shadowRadius = 3
      }
  
      @IBAction func dismissButton(_ sender: Any) {
          dismiss(animated: true, completion: nil)
      }
  
      //TableView
  
      func numberOfSections(in tableView: UITableView) -&gt; Int {
          return 1
      }
  
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return recipiesList.count
      }
  
      public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "cellDescription") as! TableViewCellDescription
  
          let recipies = recipiesList[indexPath.row]
          cell.recipiesModuleLabel.text = recipies.detail?.description
  
          return cell
      }
  }
  </code></pre>
  
  <p>At this moment the result is:</p>
  
  <p><a href="https://i.stack.imgur.com/M1V3q.png" rel="nofollow noreferrer">Table View Entries</a></p>
  
  <p>Any ideas?</p>