# `GSLayer selectedObjects`

*Instance Method*

Content representing the selected elements for serialization and paste.

## Declaration

```swift
func selectedObjects() -> [AnyHashable : Any]
```

```objc
- (NSDictionary *) selectedObjects;
```

```python
selectedObjects() -> dict
```

## Discussion

Partial path selections are represented as open path fragments. Related corner and cap hints are included when their complete attachment is selected.

## See Also

### Selection Serialization

- [`GSLayer selectedElementsMappings`](/Core/GlyphsCore/GSLayer/selectedElementsMappings) — Structural mappings for the selected elements.
- [`GSLayer removeMappedElements:`](/Core/GlyphsCore/GSLayer/removeMappedElements:) — Removes elements described by structural mappings.
- [`GSLayer removeElement:`](/Core/GlyphsCore/GSLayer/removeElement:) — Removes a selectable element from the layer.
- [`GSLayer removeNodesCutPath:`](/Core/GlyphsCore/GSLayer/removeNodesCutPath:) — Removes mapped nodes while preserving the unselected path portions.
- [`GSLayer pasteDict:format:selectedNodes:error:`](/Core/GlyphsCore/GSLayer/pasteDict:format:selectedNodes:error:) — Adds content from a serialized selection dictionary.
- [`GSLayer selectedPaths:notSelected:`](/Core/GlyphsCore/GSLayer/selectedPaths:notSelected:) — Separates paths by whether they contain selected nodes.

