---
title: collection
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsexpression/collection
---

# collection

The collection of expressions in an aggregate expression, or the collection element of a subquery expression.

## Declaration

```swift
var collection: Any { get }
```

## Discussion

Discussion Accessing this property raises an exception if it is not applicable to the expression.

## See Also

### Getting Information About an Expression

- [arguments](foundation/nsexpression/arguments.md)
- [constantValue](foundation/nsexpression/constantvalue.md)
- [expressionType](foundation/nsexpression/expressiontype-swift.property.md)
- [NSExpression.ExpressionType](foundation/nsexpression/expressiontype-swift.enum.md)
- [function](foundation/nsexpression/function.md)
- [keyPath](foundation/nsexpression/keypath.md)
- [operand](foundation/nsexpression/operand.md)
- [predicate](foundation/nsexpression/predicate.md)
- [left](foundation/nsexpression/left.md)
- [right](foundation/nsexpression/right.md)
- [variable](foundation/nsexpression/variable.md)
