title: how to save array to ios document directory?
body: <p>I have my own type of array and how can i save this array to ios document directory. Here is my code <br></p>
  
  <pre><code>struct Patient {
          var lastName: String?
          var firstName: String?
      }
  var offpatients = [Patient]()
  let patient = Patient(lastName: lastName as String?, firstName: firstName as String?)
  offpatients.append(patient)
  
  for p in offpatients {
      print("offline patients \(p)")
  }
  </code></pre>