Lasso Soft Inc. > Home

[Map->Remove]

[Map->Remove] removes an item from the map by key. Accepts a single parameter identifying the key of the item to be removed.

  • Syntax
  • Parameters
[Map->(Remove: Map Key)]
Required Parameters
Map The map which is to be operated upon.
Map Key The key of an element which should be removed from the map.
Examples

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;
?>
Result:
2
Tag Link [Map->Remove] Category Array
Type Member Data Source Any
Support Preferred Version 5.0
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, 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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft