---
title: "sectionIdentifier(containingItem:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/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](appkit/nsdiffabledatasourcesnapshot-swift.struct/itemidentifiers.md)
- [sectionIdentifiers](appkit/nsdiffabledatasourcesnapshot-swift.struct/sectionidentifiers.md)
- [indexOfItem(_:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/indexofitem(_:).md)
- [indexOfSection(_:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/indexofsection(_:).md)
- [itemIdentifiers(inSection:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/itemidentifiers(insection:).md)
