---
title: unkeyedContainer()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/decoder/unkeyedcontainer()
---

# unkeyedContainer()

Returns the data stored in this decoder as represented in a container appropriate for holding values with no keys.

## Declaration

```swift
func unkeyedContainer() throws -> any UnkeyedDecodingContainer
```

## Return Value

Return Value An unkeyed container view into this decoder.

## Discussion

Discussion note: DecodingError.typeMismatch if the encountered stored value is not an unkeyed container.
