<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/mutableOrderedSetValue(forKeyPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)mutableOrderedSetValueForKeyPath:"
  },
  "title" : "mutableOrderedSetValue(forKeyPath:)"
}
-->

# mutableOrderedSetValue(forKeyPath:)

Returns a mutable ordered set that provides read-write access to the uniquing ordered to-many relationship specified by a given key path.

```
func mutableOrderedSetValue(forKeyPath keyPath: String) -> NSMutableOrderedSet
```

## Parameters

`keyPath`

A key path, relative to the receiver, to a uniquing ordered to-many relationship represented by a set.

## Return Value

A mutable ordered set that provides read-write access to the uniquing to-many relationship specified by `keyPath`.

## Discussion

See [`mutableOrderedSetValue(forKey:)`](/documentation/ObjectiveC/NSObject-swift.class/mutableOrderedSetValue(forKey:)) for additional details.

---

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)