loop_key
Returns the current key during keyed iteration.
Target
Signature
1loop_key()Returns the current key during keyed iteration.
loop_key is a global callable that can be used wherever an expression is valid. loop_key affects how expressions are parsed. Small examples are worth running in isolation before placing the same shape inside a larger template block.
Examples
Basic call
1with item in map('a'=1) do => { loop_key }The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.