title: Swift - array to data and back to string
body: <p>I want to array string to base64 and then back to the string</p>
  
  <p>I try the following</p>
  
  <pre><code>let array = [[1,2,"preved"], [3,4,"hola"], [5,6,"poka"]]
  
  let encodedData = NSKeyedArchiver.archivedData(withRootObject: array)
  
  let base64String = encodedData.base64EncodedString()
  
  let data = Data(base64Encoded: base64String)
  let decodedData = NSString(data: data!, encoding: String.Encoding.utf8.rawValue)
  print(decodedData)
  </code></pre>
  
  <p>problem is that <code>decoded data</code> prints back nil</p>
  
  <p>What am I doing wrong ?</p>