Object containing a list of key-value pairs where the keys are unique.
| Name | Type | Description |
| is_valid | Boolean | True if there is at least one key-value pair |
| value | String | The json representation of the values. For dictionary fields you do not typically care about this - use values instead |
| editable | Boolean | True if properties can be added or removed from this dictionary. This will only be true if the dictionary was created using the {% create_dictionary %} method |
| keys | list | A list of strings containing all of the keys in the dictionary |
| values | object | An object containing all of the keys and values of the dictionary |
| count | Integer | The number of key-value pairs in the dictionary |
| field_id | String | The identifier for this field |
| label | String | The label for this field |
| output | String | The JSON representation of the values. May include additional markup in the editor preview to make it easier to edit content |
Individual dictionary values may be accessed using the {{ dictionary.keyName }}, {{ dictionary['keyName'] }}, {{ dictionary.values.keyName }}, or dictionary.values['keyName'] syntax.
You may also treat this object as a list containing all of the keys which may be iterated using a {% for %} loop. For more details, see the examples below:
Creates a new editable dictionary with the given properties.
{% create_dictionary [var, set, or assign]? variable = attributes %}
Create Settings Dictionary
Copy{% set_dictionary %}
Sets properties on an editable dictionary object. If the dictionary does not exist it will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
{% unset_dictionary %}
Removes properties from an editable dictionary object. If the dictionary does not exist an empty one will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
{% copy_to_dictionary %}
Copies properties from one or more copyable objects (eg: dictionaries) into an editable dictionary. If the dictionary is not editable this will throw an error. If the dictionary does not exist then one will be created and saved on the current scope.
Sets properties on an editable dictionary object. If the dictionary does not exist it will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
{% set_dictionary variable = attributes %}
Set Dictionary Properties
Copy{% create_dictionary %}
Creates a new editable dictionary with the given properties.
{% unset_dictionary %}
Removes properties from an editable dictionary object. If the dictionary does not exist an empty one will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
{% copy_to_dictionary %}
Copies properties from one or more copyable objects (eg: dictionaries) into an editable dictionary. If the dictionary is not editable this will throw an error. If the dictionary does not exist then one will be created and saved on the current scope.
Removes properties from an editable dictionary object. If the dictionary does not exist an empty one will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
{% unset_dictionary variable attributes %}
Unset Dictionary Properties
Copy{% create_dictionary %}
Creates a new editable dictionary with the given properties.
{% set_dictionary %}
Sets properties on an editable dictionary object. If the dictionary does not exist it will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
{% copy_to_dictionary %}
Copies properties from one or more copyable objects (eg: dictionaries) into an editable dictionary. If the dictionary is not editable this will throw an error. If the dictionary does not exist then one will be created and saved on the current scope.
Copies properties from one or more copyable objects (eg: dictionaries) into an editable dictionary. If the dictionary is not editable this will throw an error. If the dictionary does not exist then one will be created and saved on the current scope.
{% copy_to_dictionary variable = copyable_objects new_only? %}
The following objects are copyable and can be used as arguments in the {% copy_to_dictionary %} method:
Copy Dictionary
Copy{% create_dictionary %}
Creates a new editable dictionary with the given properties.
{% set_dictionary %}
Sets properties on an editable dictionary object. If the dictionary does not exist it will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
{% unset_dictionary %}
Removes properties from an editable dictionary object. If the dictionary does not exist an empty one will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
Create Settings Dictionary
CopyUnset Dictionary Properties
CopySet Dictionary Properties
CopyList all keys and values for a dictionary field
CopyWorking with specific dictionary field properties
CopyCopy Dictionary
Copy