Dictionaries
Snowman provides a set of functions for working with dictionaries (also known as maps or associative arrays). These functions allow you to create, manipulate, and query dictionary data structures in your templates.
Dictionaries are useful for organizing related data, building dynamic structures, and transforming data during template rendering.
Available Functions
dict_create- Create a new dictionary from key-value pairsdict_get- Get a value from a dictionary by keydict_set- Set a key-value pair in a dictionarydict_unset- Remove a key from a dictionarydict_has_key- Check if a dictionary contains a keydict_keys- Get all keys from one or more dictionariesdict_values- Get all values from a dictionarydict_pick- Create a new dictionary with only specified keysdict_omit- Create a new dictionary excluding specified keysdict_pluck- Extract values for a specific key from multiple dictionariesdict_find- Navigate nested dictionaries safely with a default value