---
title: results
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsmetadataquery/results
---

# results

An array containing the query’s results.

## Declaration

```swift
var results: [Any] { get }
```

## Discussion

Discussion The array is a proxy object that is primarily intended for use with Cocoa bindings. While it is possible to copy the proxy array and receive a “snapshot” of the complete current query results, it is generally not recommended due to performance and memory issues. To access individual result array elements, use the resultCount and result(at:) methods. The array supports Key-value observing, which can be used to be notified when items are added, removed, or updated in the array of results. By default, this array contains NSMetadataItem objects, each of which represents the metadata associated with a file. However, the query’s delegate can substitute these objects with instances of a different class. important: Accessing this property implicitly disables updates, and enables updates again once the resulting array is deallocated.

## See Also

### Getting query results

- [resultCount](foundation/nsmetadataquery/resultcount.md)
- [result(at:)](foundation/nsmetadataquery/result(at:).md)
- [index(ofResult:)](foundation/nsmetadataquery/index(ofresult:).md)
- [groupedResults](foundation/nsmetadataquery/groupedresults.md)
- [NSMetadataQueryResultGroup](foundation/nsmetadataqueryresultgroup.md)
- [enumerateResults(_:)](foundation/nsmetadataquery/enumerateresults(_:).md)
- [enumerateResults(options:using:)](foundation/nsmetadataquery/enumerateresults(options:using:).md)
- [valueLists](foundation/nsmetadataquery/valuelists.md)
- [NSMetadataQueryAttributeValueTuple](foundation/nsmetadataqueryattributevaluetuple.md)
- [value(ofAttribute:forResultAt:)](foundation/nsmetadataquery/value(ofattribute:forresultat:).md)
- [enableUpdates()](foundation/nsmetadataquery/enableupdates().md)
- [disableUpdates()](foundation/nsmetadataquery/disableupdates().md)
- [operationQueue](foundation/nsmetadataquery/operationqueue.md)
