title: How can I read data from a PLIST in Swift?
body: <p>i'm facing a problem with reading data from a plist file using swift
  <img src="https://i.stack.imgur.com/ly9qW.png" alt="my .plist file"></p>
  
  <p>my code:</p>
  
  <pre><code>        let Chapterpath = NSBundle.mainBundle().pathForResource("chapterMapping", ofType: "plist")
      let dict2 = NSDictionary(contentsOfFile: Chapterpath!)
      let chaptername = dict2?.objectForKey("chapterName")
      let chapterNumber = dict2?.objectForKey("pageNumber")
  </code></pre>
  
  <p>next i'm trying to add plist data to an array, should i simply use</p>
  
  <pre><code>var myArray = [chapterName]
  </code></pre>
  
  <p>my question: is the code above correct?
  or im i missing something
  and when i tried to print plist data using println((chapterName))
  i got an error</p>
  
  <p>thank you</p>