---
title: "subscript(dynamicMember:)"
framework: appintentstesting
role: symbol
role_heading: Instance Subscript
path: "appintentstesting/anyappentity/subscript(dynamicmember:)-4bdp1"
---

# subscript(dynamicMember:)

Accesses an entity property by name, without casting.

## Declaration

```swift
subscript(dynamicMember identifier: String) -> (any IntentValueExpressing)? { get }
```

## Overview

Overview The code below shows the syntactic sugar and the equivalent, desugared, subscript syntax. entity.someName == nil entity[dynamicMember: "someName"] == nil

CreateCoffeeIntent.makeIntent(customerName: entity.someName) CreateCoffeeIntent.makeIntent(customerName: entity[dynamicMember: "someName"]) For more information about dynamic-member syntax, see dynamicMemberLookup in The Swift Programming Language.
