---
title: "firstValue(matchingCategory:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/sequence/firstvalue(matchingcategory:)"
---

# firstValue(matchingCategory:)

Finds the first tag matching the specified category and returns the value of the matching tag.

## Declaration

```swift
func firstValue<T>(matchingCategory category: CMTypedTag<T>.Category) -> T? where T : Sendable
```

## Discussion

Discussion category: The category to match.
