Help centerConsole

Getting Started

IntroductionCreate a projectIntelliSense

AI Components

Getting started

Courier

Getting startedCommandsConfiguration
Upgrade

Canvas

ExpressionsFilters & functionsCanvasTemplatingVariables
absbatchcapitalizecolumnconvert_encodingdate_modifydatedefaultescapefilterfirstformatgroup_byimage_tagimage_urljoinjson_encodekeyslastlengthlowermapmergenl2brnumber_formatrawreading_timereducereplacereverseroundsliceslugsortspacelesssplitstriptagstitletrimupperurl_encodeDeprecated filters
Help centerConsole
DocumentationAPI ReferenceGuidesChangelog
CanvasFilters

last

The last filter returns the last "element" of a sequence, a mapping, or a string.

{{ [1, 2, 3, 4] | last }}
{# outputs 4 #}

{{ { a: 1, b: 2, c: 3, d: 4 } | last }}
{# outputs 4 #}

{{ '1234' | last }}
{# outputs 4 #}

Last updated on

keys

The keys filter returns the keys of an array.

length

The length filter returns the number of items of a sequence or mapping, or the length of a string.