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
For some reason the following code did not remove all the merged regions at once:

```
logger.info("Number of merged regions = " + sheet.getNumMergedRegions());
for (int i = 0; i < sheet.getNumMergedRegions(); i++) {
    logger.info("Removing merged region " + (i + 1));
    sheet.removeMergedRegion(i);
}
logger.info("\nNumber of merged regions = " + sheet.getNumMergedRegions());

```

In the console I see this:

```
Number of merged regions = 7
Removing merged region 1
Removing merged region 2
Removing merged region 3
Removing merged region 4

Number of merged regions = 3

```

**Fix:**

```
while (sheet.getNumMergedRegions() > 0) {
    logger.info("Number of merged regions = " + sheet.getNumMergedRegions());
    for (int i = 0; i < sheet.getNumMergedRegions(); i++) {
        logger.info("Removing merged region " + (i + 1));
        sheet.removeMergedRegion(i);
    }
}

```