Tag Link | [Map->Remove] | Category | Array |
---|---|---|---|
Type | Member | Source Available | No |
Support | Preferred | Version | 5.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
[Map->Remove] removes an item from the map by key. Accepts a single parameter identifying the key of the item to be removed.
[Map->(Remove: Map Key)]
Required Parameters | |
---|---|
Map Key | The key of an element which should be removed from the map. |
To remove an element from a map:
Use the [Map->Remove] tag. The following example removes the value for the key 'red' from the map leaving only the values for the keys 'blue' and 'green.'
<?LassoScript
Variable: 'Colors'=(Map: 'red'='#ff0000',
'green'='#00ff00',
'blue'='#0000ff');
$Colors->(Remove: 'red');
Output: $Colors->Size;
?>
2