title: How to use NSUserDefaults to store an array of dictionaries
body: <p>Trying to store an array of dictionaries with <code>NSUserDefaults</code>.</p>
  
  <pre><code>var theTasks: [[String:Any]] = [["num":1,"title":"example","colour":"red"]] 
  
  let defaults = NSUserDefaults.standardUserDefaults()
      defaults.setObject(theTasks, forKey: "myTasks")
      defaults.synchronize()
  
  let selected = theTasks[1]
  </code></pre>
  
  <p>Gives error:</p>
  
  <blockquote>
    <p>Cannot convert value of type '[[String:Any]]' to expected argument of type 'AnyObject?'</p>
  </blockquote>