# `GSLayer tempDataForKey:`

*Instance Method*

The temporary value for a key, or `nil` if no value is set.

## Declaration

```swift
func tempData(forKey key: String) -> Any?
```

```objc
- (id) tempDataForKey:(NSString *) key;
```

```python
tempDataForKey_(key: str) -> object
```

## See Also

### Temporary Data

- [`GSLayer.tempData`](/Core/GlyphsCore/GSLayer/tempData) — Values associated with the layer for transient use.
- [`GSLayer setTempData:forKey:`](/Core/GlyphsCore/GSLayer/setTempData:forKey:) — Sets or removes a temporary value.

