title: Save Nested Dictionary in UserDefaults and manage the duplication check [Swift 4.2]
body: <p>I have a nested Dictionary required to save in UserDefaults and share to extension. The dictionary structure like below:</p>
  
  <pre><code>let dict = [
          "Sections" : [
              ["Title" : "Title1", "Items": ["item1-1", "item1-2", "item1-3"]],
              ["Title" : "Title2", "Items": ["item2-1", "item2-2", "item2-3", "item2-4"]],
              ["Title" : "Title3", "Items": ["item3-1"]],
          ]
      ]
  </code></pre>
  
  <p>Which saved successfully with:</p>
  
  <pre><code>UserDefaults(suiteName: "group.identifier.test")!.setValue(dict, forKey: "savedDict")
  </code></pre>
  
  <p>But now I wish to get it back and check is Title2 already exists, if yes then delete it and add again with new Items</p>
  
  <p>I used to do following but can't get the Title back:</p>
  
  <pre><code>let savedDict:[String:AnyObject] = UserDefaults(suiteName: "group.identifier.test")!.object(forKey: "savedDict") as! Dictionary
  </code></pre>
  
  <p>success to get the data under "Sections" by following code</p>
  
  <pre><code>let savedSection = savedDict["Sections"]
  print("Saved Section: \(savedSection)")
  </code></pre>
  
  <p>but not able to get the Title with:</p>
  
  <pre><code>print("Saved Title: \(savedSection!["Title"])") *// return nil*
  </code></pre>
  
  <p>I tried for (key, value) too, but fired a data type error</p>
  
  <pre><code>for (key, value) in savedSection{  *// Type 'AnyObject?' does not conform to protocol 'Sequence'*
      print("Key: \(key) Value: \(value)")
  }
  </code></pre>
  
  <p>May I know is there any way to get the "Title" back for checking and update? Am I using the wrong way to store this kind of nested data? </p>
  
  <p>Many Thanks!</p>