---
title: merge
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osdictionary/merge
---

# merge

Adds all members of a dictionary to this dictionary.

## Declaration

```occ
bool merge(const OSDictionary *otherDictionary);
```

## Parameters

- `otherDictionary`: All members of thie dictionary will be added to the array.

## Return Value

Return Value True on success, which retains all the added objects, or false on failure which does not retain the objects.

## Discussion

Discussion Adds all members of a dictionary to this dictionary. Any keys in the dictionary that exist will be replaced. The dictionary capacity will be grown if necessary.

## See Also

### Creating a Dictionary

- [withCapacity](driverkit/osdictionary/withcapacity.md)
- [withDictionary](driverkit/osdictionary/withdictionary.md)
- [withObjects](driverkit/osdictionary/withobjects.md)
- [OSDictionaryCreate](driverkit/osdictionarycreate.md)
- [free](driverkit/osdictionary/free.md)
- [flushCollection](driverkit/osdictionary/flushcollection.md)
