Add an elemento to the map.
1 map.put
<map.put name='name'>
<expr /> ?
<var /> ?
</map.put>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Name of the map. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eexpr | Integer | ||||
Evar | Integer |
Example
Copy
<xsql-script name='map_put_sample1'> <body> <map name='a'> <item>0<string>ZERO</string></item> <item>1<string>ONE</string></item> <item>2<string>TWO</string></item> <item>3<string>THREE</string></item> <item>4<string>FOUR</string></item> <item>5<string>FIVE</string></item> <item>6<string>SIX</string></item> <item>7<string>SEVEN</string></item> <item>8<string>EIGHT</string></item> <item>9<string>NINE</string></item> </map> <map.put name='a'>10<string>TEN</string></map.put> <println><a/></println> </body> </xsql-script>
It is added to the table a new element formed by the integer 10 (key) or the word TEN (value):
Copy
<map.put name='a'>10<string>TEN</string></map.put>
The structure of 10 becomes to 11 elements.