<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMetadataQueryResultGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMetadataQueryResultGroup"
  },
  "title" : "NSMetadataQueryResultGroup"
}
-->

# NSMetadataQueryResultGroup

The `NSMetadataQueryResultGroup` class represents a collection of grouped attribute results returned by an [`NSMetadataQuery`](/documentation/Foundation/NSMetadataQuery) object.

```
class NSMetadataQueryResultGroup
```

## Topics

### Getting Query Results

[`attribute`](/documentation/Foundation/NSMetadataQueryResultGroup/attribute)

The result group’s attribute name.

[`value`](/documentation/Foundation/NSMetadataQueryResultGroup/value)

The result group’s value.

[`results`](/documentation/Foundation/NSMetadataQueryResultGroup/results)

An array containing the result group’s result objects.

[`resultCount`](/documentation/Foundation/NSMetadataQueryResultGroup/resultCount)

The number of results returned by the result group.

[`-  resultAtIndex:`](/documentation/Foundation/NSMetadataQueryResultGroup/result(at:))

Returns the query result at a specific index.

[`subgroups`](/documentation/Foundation/NSMetadataQueryResultGroup/subgroups)

An array containing the result group’s subgroups.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)