DynamicPropertyPath
A type-safe, dynamic path to access nested intent values.
Declaration
@dynamicMemberLookup struct DynamicPropertyPathOverview
You typically don’t create instances of DynamicPropertyPath directly. The system returns instances of the type to indicate that you can further traverse a nested property. Use DynamicPropertyPath for chained property access and array indexing on entities and intent results.
// Navigate nested properties.
let name: String = try entity.profile.name
// Index properties into an array.
let first: String = try entity.tags[0]
// Cast the entity to a known entity type definition.
let coffee: AnyAppEntity = try result.value.as(CoffeeEntity)