title: Saving an array of arrays to user defaults
body: <p>I can save a single array to user defaults using this: </p>
  
  <pre><code>var array = [0,0,0]
  
  defaults.set(array, forKey: "SavedArray") //saves array
  
  array = defaults.object(forKey: "SavedArray") as? [Int] ?? [Int]()
  </code></pre>
  
  <p>but it will not let me save an array of arrays, I'm trying this:</p>
  
  <pre><code>arrayOfArrays = [[0,0,0],[0,0,0],[0,0,0],[0,0,0]]
  
  defaults.set(arrayOfArrays, forKey: "SavedArrayOfArrays") //saves array
  
  arrayOfArrays = [defaults.object(forKey: "SavedArrayOfArrays") as? Array&lt;Int&gt; ?? Array&lt;Int&gt;()] //loads array
  </code></pre>
  
  <p>It results in loading an empty array within an array "[[]]" and does not save the list of arrays within an array. </p>