<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSDictionary/objects(forKeys:notFoundMarker:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDictionary(im)objectsForKeys:notFoundMarker:"
  },
  "title" : "objects(forKeys:notFoundMarker:)"
}
-->

# objects(forKeys:notFoundMarker:)

Returns as a static array the set of objects from the dictionary that corresponds to the specified keys.

```
func objects(forKeys keys: [Any], notFoundMarker marker: Any) -> [Any]
```

## Parameters

`keys`

An `NSArray` containing the keys for which to return corresponding values.

`marker`

The marker object to place in the corresponding element of the returned array if an object isn’t found in the dictionary to correspond to a given key.

## Discussion

The objects in the returned array and the `keys` array have a one-for-one correspondence, so that the nthe object in the returned array corresponds to the nthe key in `keys`.

## See Also

[`-  getObjects:andKeys:`](/documentation/Foundation/NSDictionary/getObjects:andKeys:)

Returns by reference C arrays of the keys and values in the dictionary.



---

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)