title: How to access strings in saved array structure from UITableView
body: <p>I have structure that consists of strings and an array of exercises. Users input their exercises and these values are saved to the device using core data. The values are shown in a UITableview. I have added a button to the UITableview so that the details that the user has inputted can be edited. My problem is I don't know how to access the specific text that the user has entered to enable them to edit it.</p>
  
  <p>My array:</p>
  
  <pre><code>var contacts = [Contact]()
  </code></pre>
  
  <p>Structure: </p>
  
  <pre><code>//Structure
  struct Contact {
  var id:String = "Contact - \(UUID())"
  var fullname: String
  var exercises : [Exercise]
  }
  </code></pre>
  
  <p>My Exercise class</p>
  
  <pre><code>class Exercise : NSObject , NSSecureCoding{
  static var supportsSecureCoding: Bool = true
  
  var excerciseName: String
  var excerciseReps: String
  var excerciseSets: String
  var excerciseWeights: String
  
  init(Name : String, Reps : String, Sets : String, Weights : String) {
      excerciseName = Name
      excerciseReps = Reps
      excerciseSets = Sets
      excerciseWeights = Weights
  }
  
  func encode(with aCoder: NSCoder) {
      aCoder.encode(excerciseName, forKey: "excerciseName")
      aCoder.encode(excerciseReps, forKey: "excerciseReps")
      aCoder.encode(excerciseSets, forKey: "excerciseSets")
      aCoder.encode(excerciseWeights, forKey: "excerciseWeights")
  }
  
  required convenience init?(coder aDecoder: NSCoder) {
      let excerciseName = aDecoder.decodeObject(forKey: "excerciseName") as! String
      let excerciseReps = aDecoder.decodeObject(forKey: "excerciseReps") as! String
      let excerciseSets = aDecoder.decodeObject(forKey: "excerciseSets") as! String
      let excerciseWeights = aDecoder.decodeObject(forKey: "excerciseWeights") as! String
  
      self.init(Name: excerciseName, Reps: excerciseReps, Sets: excerciseSets, Weights: excerciseWeights)
  
     }
    }
  </code></pre>
  
  <p>The code I am using to try and access the specific exercise that the user has entered is </p>
  
  <pre><code>print(self.contacts[indexPath.section].exercises)
  </code></pre>
  
  <p>However this will print the below value seen in the image and not the actual text that the user has entered. how to i access the actual text that the user has entered? </p>
  
  <p><a href="https://i.stack.imgur.com/Y3aZI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y3aZI.png" alt="enter image description here"></a></p>