title: How to access items from an implemented PLIST dictionary?
body: <p>I've pulled items from a plist and implemented them into a dictionary, however I'm not quite sure how to unwrap and make these items available from a variable. Heres what I have:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController,
      UITableViewDataSource {
  
     // Loading in the PLIST file
     override func viewDidLoad() {
      super.viewDidLoad()
     }
      var courses = loadCSCourses()
  
      //variables
      var courseData = courses["CS 1400"]
      var shortDescription = courseData["ShortDescription"]
      var courseKeys = Array(courses.keys)
      @IBOutlet weak var mySwitch: UISwitch!
      @IBOutlet weak var tableView: UITableView!
      @IBAction func whenSwitchOn (sender:AnyObject) {
          if (mySwitch.isOn){
              self.tableView.reloadData()
          }
      }
  
      func sortingCourseKeys() {
          courseKeys.sort()
      }
      // The number of rows
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return courses!.count
      }
  
      // The number of cells in each row
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
          let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
  
          //Naming the Title and Subtitle line
          cell.textLabel?.text = "course name"
          cell.detailTextLabel?.text = "course description"
          cell.accessoryType = .checkmark
  
          return cell
      }
  
      // Selecting and deslecting rows
      func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath){
  
          let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
          cell.textLabel?.text = courseKeys[indexPath.row]
          if cell.contains(courseKeys[indexPath.row]) {
              cell.accessoryType = .checkmark
          }else{
              cell.accessoryType = .none
          }
          return
      }
  }
  
  func loadCSCourses() -&gt; [String : [String : String]]? {
      let pListFileURL = Bundle.main.url(forResource: "CSCourses", withExtension: "plist", subdirectory: "")
      if let pListPath = pListFileURL?.path,
          let pListData = FileManager.default.contents(atPath: pListPath) {
          do {
              let pListObject = try PropertyListSerialization.propertyList(from: pListData, options:PropertyListSerialization.ReadOptions(), format:nil)
              guard let maybeCourses = pListObject as? [String : [String : String]] else {
                  return nil
              }
              return maybeCourses
          } catch {
              print("Error reading CSCourses plist file: \(error)")
              return nil
          }
      }
      return nil
  }
  </code></pre>
  
  <p>I am getting the errors:
  Cannot use instance member 'courses' within property initializer; property initializers run before 'self' is available
  &amp;
  Value of optional type '[String : [String : String]]?' must be unwrapped to refer to member 'subscript' of wrapped base type '[String : [String : String]]'</p>
  
  <p>Any hints, links, or help will be greatly appreciated. Thanks guys.</p>