---
title: "subscript(_:)"
framework: appintentstesting
role: symbol
role_heading: Instance Subscript
path: "appintentstesting/dynamicpropertypath/subscript(_:)-4bof1"
---

# subscript(_:)

Accesses a nested property on a collection element by index.

## Declaration

```swift
subscript(index: Int) -> DynamicPropertyPath { get }
```

## Overview

Overview The code below shows the syntactic sugar and the equivalent, desugared, subscript syntax. let result = try await intent.run() // Expected an array of customer entities

result.value[0].name == nil CreateCoffeeIntent.makeIntent(customerName: result.value[0].name) For more information about dynamic-member syntax, see dynamicMemberLookup in The Swift Programming Language.
