---
title: "values(forAttributes:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmetadataitem/values(forattributes:)"
---

# values(forAttributes:)

Returns a dictionary containing the key-value pairs for the attribute names specified by a given array of keys.

## Declaration

```swift
func values(forAttributes keys: [String]) -> [String : Any]?
```

## Parameters

- `keys`: An array containing NSString objects that specify the names of a metadata attributes. See the “Constants” section for a list of possible keys.

## Return Value

Return Value A dictionary containing the key-value pairs for the attribute names specified by keys.

## See Also

### Getting Item Attributes

- [attributes](foundation/nsmetadataitem/attributes.md)
- [value(forAttribute:)](foundation/nsmetadataitem/value(forattribute:).md)
