---
title: "objects(forKeys:notFoundMarker:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsdictionary/objects(forkeys:notfoundmarker:)"
---

# objects(forKeys:notFoundMarker:)

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

## Declaration

```swift
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

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

### Accessing Keys and Values

- [allKeys](foundation/nsdictionary/allkeys.md)
- [allKeys(for:)](foundation/nsdictionary/allkeys(for:).md)
- [allValues](foundation/nsdictionary/allvalues.md)
- [value(forKey:)](foundation/nsdictionary/value(forkey:).md)
- [object(forKey:)](foundation/nsdictionary/object(forkey:).md)
- [subscript(_:)](foundation/nsdictionary/subscript(_:)-52n56.md)
- [subscript(_:)](foundation/nsdictionary/subscript(_:)-1bt1b.md)
