Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6.0] Document keys and values modifiers #1352

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions content/collections/modifiers/keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: 9197be05-5e2d-400f-a0f0-c52a4d460e60
blueprint: modifiers
title: Keys
modifier_types:
- array
- utility
---
Retrieves just the keys from the given array.

```yaml
the_team:
jack: Jack McDade
jason: Jason Varga
jesse: Jesse Leite
joshua: Joshua Blum
duncan: Duncan McClean
```

```
{{ the_team | keys }}
```

```yaml
- jack
- jason
- jesse
- joshua
- duncan
```
30 changes: 30 additions & 0 deletions content/collections/modifiers/values.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: b57caa5c-ae9e-4220-b8a6-f7c82d16f0df
blueprint: modifiers
title: Values
modifier_types:
- array
- utility
---
Retrieves just the keys from the given array.

```yaml
the_team:
jack: Jack McDade
jason: Jason Varga
jesse: Jesse Leite
joshua: Joshua Blum
duncan: Duncan McClean
```

```
{{ the_team | values }}
```

```yaml
- Jack McDade
- Jason Varga
- Jesse Leite
- Joshua Blum
- Duncan McClean
```