30 lines
774 B
Markdown
30 lines
774 B
Markdown
## Usage Example
|
|
|
|
Creation and management of lists:
|
|
|
|
```javascript
|
|
// Creating a list
|
|
variableToList("item1", "myList")
|
|
variableToList("item2", "myList")
|
|
variableToList("item3", "myList")
|
|
|
|
// Retrieving an item from the list
|
|
itemFromList("myList", 1, "myVariable")
|
|
|
|
// Getting the length of the list
|
|
getListLen("myList", "listLength")
|
|
```
|
|
|
|
Creation and management of objects (dictionaries):
|
|
|
|
```javascript
|
|
// Creating an object
|
|
AddvariableToJSON("key1", "value1", "myObject")
|
|
AddvariableToJSON("key2", "value2", "myObject")
|
|
|
|
// Retrieving a value by key from the object
|
|
variableFromJSON("myObject", "key1", "myVariable")
|
|
```
|
|
|
|
In this way, lists and objects in AVAP can be manipulated using the specific functions provided for working with variables stored as strings.
|