---
title: "subscript(dynamicMember:)"
framework: appintentstesting
role: symbol
role_heading: Instance Subscript
path: "appintentstesting/anyappintent/subscript(dynamicmember:)-127ab"
---

# subscript(dynamicMember:)

Accesses an intent parameter by name, for comparison with a known value.

## Declaration

```swift
subscript<T>(dynamicMember identifier: String) -> T where T : IntentValueConvertible { get throws }
```

## Overview

Overview The code below shows the syntactic sugar and the equivalent, desugared, subscript syntax. try intent.someName == "My Name" try intent[dynamicMember: "someName"] == "My Name" If the property’s value isn’t an instance of the type T, this subscript throws an error. For more information about dynamic-member syntax, see dynamicMemberLookup in The Swift Programming Language.
