---
title: sortDescriptors
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkdocumentquery/sortdescriptors
---

# sortDescriptors

An array of sort descriptors that specify the order of the results returned by this query.

## Declaration

```swift
var sortDescriptors: [NSSortDescriptor]? { get }
```

## Discussion

Discussion This property contains the value passed to the init(documentType:predicate:limit:sortDescriptors:includeDocumentData:resultsHandler:) method’s sortDescriptors parameter.

## See Also

### Accessing the Document Query’s Properties

- [includeDocumentData](healthkit/hkdocumentquery/includedocumentdata.md)
- [limit](healthkit/hkdocumentquery/limit.md)
