[Map->Insert] inserts a value into the map for a specified key. Accepts a single name/value parameter which is the name of a key in the array and the value that should be stored for that key.
Keys and values can be of any data types.
Note: This tag will replace an item in the map with the same key. Each map can only store one value for each key.
[Map->(Insert: 'Map Key'='Map Value')]
Use the [Map->Insert] tag. The following example adds a new color black to the 'Colors' map with an appropriate HTML color code as the value.
<?LassoScript
Variable: 'Colors'=(Map: 'red'='#ff0000',
'green'='#00ff00',
'blue'='#0000ff');
$Colors->(Insert: 'black'='#000000');
Output: $Colors->(Find: 'black');
?>
#000000
Tag Link | [Map->Insert] | Category | Array |
---|---|---|---|
Type | Member | Data Source | Any |
Support | Preferred | Version | 5.0 |
Output Type | None | Security | None |
Implementation | LCAPI | Sets | Lasso 7.0, Lasso 6.0, Lasso 5.0 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft