---
title: "value(at:inPropertyWithKey:)"
framework: objectivec
role: symbol
role_heading: Instance Method
path: "objectivec/nsobject-swift.class/value(at:inpropertywithkey:)"
---

# value(at:inPropertyWithKey:)

Retrieves an indexed object from the collection specified by the passed key.

## Declaration

```swift
func value(at index: Int, inPropertyWithKey key: String) -> Any?
```

## Discussion

Discussion This actually works with a single-value key as well if index is 0. The method valueIn<Key>AtIndex: is used if it exists.

## See Also

### Indexed access

- [insertValue(_:at:inPropertyWithKey:)](objectivec/nsobject-swift.class/insertvalue(_:at:inpropertywithkey:).md)
- [removeValue(at:fromPropertyWithKey:)](objectivec/nsobject-swift.class/removevalue(at:frompropertywithkey:).md)
- [replaceValue(at:inPropertyWithKey:withValue:)](objectivec/nsobject-swift.class/replacevalue(at:inpropertywithkey:withvalue:).md)
