Question: I have problem with parameters. This is what I need to send:

```
{
"id": "10",
"parameters": [
   {
  "name": "hash",
  "value": "hashText"
},
{
  "name": "search",
  "value": "text"
    }
  ] 
}

```

How to make correct parameter variable to this request. I use this code: 

```
   var parameters = ["id": "10",
        "parameters": [
            "name":"hash", "value": "hash_user",
            "name":"search", "value": "text"
    ]]

    let url = NSURL(string: "http://myServerName.com/api")
    var session = NSURLSession.sharedSession()

    let request = NSMutableURLRequest(URL: url!)
    request.HTTPMethod = "POST" //set http method as POST

    var err: NSError?
    request.HTTPBody = NSJSONSerialization.dataWithJSONObject(parameters, options: nil, error: &err)
    request.addValue("application/json", forHTTPHeaderField: "Content-Type")
    request.addValue("application/json", forHTTPHeaderField: "Accept")

    var task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
        println("Response: \(response)")

   ...

```

Thanks for help!

EDIT:

Problem was in parameters variable. Now I have:

```
    var parameters = [
        "id": "10",
        "parameters": [
            ["name":"hash", "value": "hash_user"]
        ]
    ]

```

and it works great.

Answer: 
Promoting a comment to an answer...

The method you want is [Sheet.removeMergedRegion(int)](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Sheet.html#removeMergedRegion%28int%29)

That takes the index of the region, which you got when you added it. Otherwise, you can use [getNumMergedRegions()](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Sheet.html#getNumMergedRegions%28%29) and [getMergedRegion(int)](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Sheet.html#getMergedRegion%28int%29) to iterate over the regions to find the index of the one you want to remove
I just figured out that internally the number of existing regions is checked after every region method. E.g. after removing Region 1 everything is new calculated like size is previousSize-1 and sheet.getNumMergedRegions() is also one less. So for me I added all regions to a list and deleted them from the sheet. I took always id 0 as the id is recalculated everytime.

```
for(int i = 0; i<numOfRegion;i++)
        {
            regions.add(sheet.getMergedRegion(0));
            sheet.removeMergedRegion(0);
        }

```