Skip to content
Nat! edited this page Mar 1, 2023 · 3 revisions

set is used to assign an expression to a variable. You may omit the set keyword if you want.

An expression is typically a string or the result of an Objective-C method call.

Example

{% set foo = [NSMutableDictionary dictionary];
   foo[ @"key"] = @"a value"
%}

{{ foo[ @"key"] }}

Output:


a value

Clone this wiki locally