title: Why am I getting this swift error? missing argument for parameter 'price' in call
body: <p>Issue:  I'm trying to create a custom object with json data, however swift is giving me an error thats theres a missing parameter when im looping/adding data to the object, Yet in the model im using an optional so I'm confused where the problem lies. ultimately this data will go into a table view.</p>
  
  <p>My model (using optionals):</p>
  
  <pre><code>class FlightDataModel {
      var airline: String?
      var price: String?
  
      init(airline: String?, price: String?) {
          self.airline = airline
          self.price = price
      }  
  }
  </code></pre>
  
  <p>The alamofire API request..</p>
  
  <pre><code> request(qpxRequest).responseJSON { (request, response, json, error) -&gt; Void in
          if response != nil {
              //NSLog("%@", response!)
          }
  
          if json != nil {
              if let myJSON = json as? [String:AnyObject] {
                  if let trips = myJSON["trips"] as? [String:AnyObject] {
                      if let data = trips["data"] as? [String:AnyObject] {
                          if let carriers = data["carrier"] as? [[String:String]] {
  
                              for (index, carrierName) in enumerate(carriers) {
  </code></pre>
  
  <p>//                                 -----PROBLEM AREA-------------</p>
  
  <pre><code>                             let myFlight = FlightDataModel(airline: carrierName["name"] as String)
  
                                  self.arrayOfFlights[index] = myFlight
                                  //println("\(self.arrayOfFlights[index].airline)")
  
  
                              }
                          }
                      }
                  }
              }
  </code></pre>