Object Literals
Object literals are data structures that allow key and value pairs to be stored in a static object.
var obj = {{ key = "value",}};println(obj.key); // "value"Object Shorthand Notation
Section titled “Object Shorthand Notation”A key can be assigned the value of the variable using a shorthand notation if the key and variable share the same name.
var key = "value";var obj = {{ key }};println(obj.key); // "value"Optional Chaining
Section titled “Optional Chaining”If the value of the object might be nil, then optional chaining can be used to safely access the value.
var maybe_obj = nil;println(maybe_obj?.key); // nil