Array in POST request with Swift
<p>I am trying to send array to PHP script, but i can't detect this array on server side. I create php script that prints all REQUEST array. And for this code:</p>

<pre><code> let mapDict = [ "var1":"First", "var2":"Second"]

    do {
        let jsonData = try NSJSONSerialization.dataWithJSONObject(mapDict, options: [])


        // create post request
        let url = NSURL(string: myURL)!
        let request = NSMutableURLRequest(URL: url)
        request.HTTPMethod = "POST"

        // insert json data to the request
        request.HTTPBody = jsonData



        let task =  NSURLSession.sharedSession().dataTaskWithRequest(request){

            data,response,error in

            if error != nil{
                print(error!.localizedDescription)
                return
            }


            let newData = NSString(data: data!, encoding: NSUTF8StringEncoding)
            print(newData)

        }

        task.resume()
    }
    catch {
        print (error)
    }
</code></pre>

<p>In Xcode console I receive </p>

<pre><code>Optional(Array
(
    [{"var1":"First","var2":"Second"}] =&gt; 
)
</code></pre>

<p>What am i doing wrong?</p>

<p>p.s. if i add .PrettyPrinted i receive:</p>

<pre><code>Optional(Array
(
[{
__"var1"_:_"First",
__"var2"_:_"Second"
}] =&gt; 
)
</code></pre>

<p>And i don't know - where are this "_:_" came from?</p>