title: Dictionaries in Array in Swift
body: <p>I'm new to Swift and I have a problem. 
  I'm trying to create an array of dictionaries in my app from table cells results and make a POST. It must be like this:</p>
  
  <pre><code>{"basket":"[{product_id: 6, quantity: 1}, {product_id: 7, quantity: 1}]"}
  </code></pre>
  
  <p>So there is a part of my code:</p>
  
  <pre><code>var basketNew: [AnyObject] = []
  
  func tableView(bla-bla){
     var basket = ["product_id":"\(myVal)", "quantity":"\(myVal)"]
     self.basketNew.append(basket)
  }
  </code></pre>
  
  <p>After that I put it into new dictionary:</p>
  
  <pre><code>var params = ["basket": self.basketNew] as Dictionary
  </code></pre>
  
  <p>And get a result from server:</p>
  
  <pre><code>{"basket":"[{product_id: 6}, {quantity: 1}, {product_id: 7}, {quantity: 1}]"}
  </code></pre>
  
  <p>What am I doing wrong? </p>
  
  <p>This is my POST request:</p>
  
  <pre><code>var request = HTTPTask()
      request.POST(self.domainNew, parameters: params, success: {(response: HTTPResponse) in
          if let data = response.responseObject as? NSData {
              var strData = NSString(data: data, encoding: NSUTF8StringEncoding)
              println("response: \(strData)")
              var err: NSError?
              var result = 0
              var json = NSJSONSerialization.JSONObjectWithData(data, options: .MutableLeaves, error: &amp;err) as NSDictionary
  println("Very Good")
              }
              }, failure: {(error: NSError, response: HTTPResponse?) in
                  println("Very Bad")
  
          })
  </code></pre>
  
  <p>I'm using framework SwiftHTTP</p>