---
title: "result(at:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmetadataqueryresultgroup/result(at:)"
---

# result(at:)

Returns the query result at a specific index.

## Declaration

```swift
func result(at idx: Int) -> Any
```

## Parameters

- `idx`: The index of the desired result.

## Return Value

Return Value The query result at a specific index.

## Discussion

Discussion For performance reasons, you should use this method when retrieving a specific result, rather than they array contained in results.

## See Also

### Getting Query Results

- [attribute](foundation/nsmetadataqueryresultgroup/attribute.md)
- [value](foundation/nsmetadataqueryresultgroup/value.md)
- [results](foundation/nsmetadataqueryresultgroup/results.md)
- [resultCount](foundation/nsmetadataqueryresultgroup/resultcount.md)
- [subgroups](foundation/nsmetadataqueryresultgroup/subgroups.md)
