<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftData",
  "identifier" : "/documentation/SwiftData/SectionedResults/index(ofSectionTitled:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftData"
    ],
    "preciseIdentifier" : "s:9SwiftData16SectionedResultsV5index15ofSectionTitledSiSgq__tF"
  },
  "title" : "index(ofSectionTitled:)"
}
-->

# index(ofSectionTitled:)

Returns the ordered index of the section with the given title, or `nil` if not found.

```
func index(ofSectionTitled title: SectionTitle) -> Int?
```

## Discussion> Complexity: O(1)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)