<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicKit",
  "identifier" : "/documentation/MusicKit/MusicLibrarySectionedRequest/filterSections(matching:memberOf:)-746mb",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MusicKit"
    ],
    "preciseIdentifier" : "s:8MusicKit0A23LibrarySectionedRequestV14filterSections8matching8memberOfys7KeyPathCy0C6FilterAA0aC11RequestablePQzqd__SgG_SayAMGtAaJRzAA0aceM25ValueMembershipComparableRd__lF"
  },
  "title" : "filterSections(matching:memberOf:)"
}
-->

# filterSections(matching:memberOf:)

Filters sections by an optional property for an array of possible values.

```
mutating func filterSections<Value>(matching keyPath: KeyPath<SectionType.LibraryFilter, Value?>, memberOf values: [Value?]) where SectionType : MusicLibraryRequestable, Value : MusicLibraryRequestFilterValueMembershipComparable
```

---

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)