Question: I have converted a JSON file to a map and I need to modify multiple values of different keys at once using JAVA.

Following is the map converted JSON file:

```
{
    "name": "",
    "numberID": null,
    "StartDate": "",
    "EndDate": "",
    "count": null,
    "level": null,
    "discipline": null,
    "paymentModel": null,
    "ownerName" : null,
    "coursepackType": null,
    "note": null
}   

```

I need to update multiple values at once from above JSON, I want to add value to following keys:

* name
* StartDate
* EndDate
* count
* ownerName

All I have write now is way to update just single value, which is already pretty linear: 
Using following series of functions:

```
String body="";
File testDataJsonfile = new File("path/xxx.json");
        JsonNode testJSONNodes = getJsonNodes(testDataJsonfile);
        Map<String, Object> mapWithJSONNodes = convertJSONTOMAP(testJSONNodes);
        body = updateValue(mapWithJSONNodes, "name", "abc")

public String updateValue(Map<String,Object> map ,String key,String value) throws JsonProcessingException{
            map.put(key, value);
            String convertedJSONFile = new ObjectMapper().writeValueAsString(map);
            return convertedJSONFile;
        }

```

Any way to to achieve what I want dynamically, probably passing an array list or so?
Please let me know if any other specification is required.

Answer: 
You can re-use your `merge` function, by dereferencing the boxes inside the `boxed_merge` function. Note that this will not re-use the allocations but instead create a new one

```
fn boxed_merge(a1: Box<A>, a2: Box<A>) -> Box<A> {
    Box::new(merge(*a1, *a2))
}

```
You can access the contents of boxed arguments by dereferencing them and combine them in a new `Box`. For example:

```
fn merge(a1: Box<usize>, a2: Box<usize>) -> Box<usize> {
    Box::new(*a1 + *a2)
}

fn main() {
    let a1 = Box::new(1);
    let a2 = Box::new(2);

    println!("{}", merge(a1, a2));
}

```