---
title: "sectionIdentifier(containingItem:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nsdiffabledatasourcesnapshot-swift.struct/sectionidentifier(containingitem:)"
---

# sectionIdentifier(containingItem:)

Returns the identifier of the section containing the specified item in the snapshot.

## Declaration

```swift
func sectionIdentifier(containingItem identifier: ItemIdentifierType) -> SectionIdentifierType?
```

## Parameters

- `identifier`: The identifier of the item contained in the section of the snapshot.

## Return Value

Return Value The identifier of the section containing the specified item, or nil if the specified item doesn’t exist in any section of the snapshot.

## See Also

### Identifying items and sections

- [itemIdentifiers](uikit/nsdiffabledatasourcesnapshot-swift.struct/itemidentifiers.md)
- [sectionIdentifiers](uikit/nsdiffabledatasourcesnapshot-swift.struct/sectionidentifiers.md)
- [indexOfItem(_:)](uikit/nsdiffabledatasourcesnapshot-swift.struct/indexofitem(_:).md)
- [indexOfSection(_:)](uikit/nsdiffabledatasourcesnapshot-swift.struct/indexofsection(_:).md)
- [itemIdentifiers(inSection:)](uikit/nsdiffabledatasourcesnapshot-swift.struct/itemidentifiers(insection:).md)
