---
title: "isEqual(to:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsdictionary/isequal(to:)"
---

# isEqual(to:)

Returns a Boolean value that indicates whether the contents of the receiving dictionary are equal to the contents of another given dictionary.

## Declaration

```swift
func isEqual(to otherDictionary: [AnyHashable : Any]) -> Bool
```

## Parameters

- `otherDictionary`: The dictionary with which to compare the receiving dictionary.

## Return Value

Return Value true if the contents of otherDictionary are equal to the contents of the receiving dictionary, otherwise false.

## Discussion

Discussion Two dictionaries have equal contents if they each hold the same number of entries and, for a given key, the corresponding value objects in each dictionary satisfy the isEqual(_:) test.

## See Also

### Related Documentation

- [isEqual(_:)](objectivec/nsobjectprotocol/isequal(_:).md)
