assistance-engine/docs/developer.avapframework.com/chapter9_19.md

15 lines
788 B
Markdown

## 6.2.7. Dictionary Displays
In AVAP, objects are created and managed using specific commands. An object is created with `AddvariableToJSON(key, value, object_variable)` , and a key from the object is retrieved with `variableFromJSON(object_variable, key, var_to_store_key_value)` .
The syntax for dictionary displays is:
```javascript
dict_display ::= "{" [dict_item_list | dict_comprehension] "}"
dict_item_list ::= dict_item ("," dict_item)* [","]
dict_item ::= expression ":" expression | "**" or_expr
dict_comprehension ::= expression ":" expression comp_for
```
A dictionary display produces a new dictionary object. If a comma-separated sequence of dictionary items is provided, they are evaluated from left to right to define the dictionary entries.