Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

Keys Modifier

Retrieves just the keys from the given array.

the_team:
jack: Jack McDade
jason: Jason Varga
jesse: Jesse Leite
joshua: Joshua Blum
duncan: Duncan McClean
{{ the_team | keys }}
<?php
$keys = Statamic::modify($the_team)->keys()->fetch();
?>
- jack
- jason
- jesse
- joshua
- duncan