Lasso Soft Inc. > Home

[Map->Keys]

The [Map->Keys] tag returns an array of all the keys used within a map. This can be useful to determine what keys a map contains without iterating through the map to fetch each one.

If the map contains no values then an empty array is returned.

  • Syntax
  • Parameters
[Map->Keys]
Required Parameters
Map The map whose keys should be returned.
Examples

To display the names of all the keys in a map:

Use the [Map->Keys] tag. This tag returns an array that contains the names of all the keys in the map. The keys are ordered in the order they are stored in the map, not in the order they were added to the map.

[Variable: 'myMap' = (Map:
  'Red'='#ff0000',
  'Blue'='#0000ff', 
  'Green'='#00ff00'
)]
[Output: $myMap->Keys]
Result:
(Array: (Blue), (Green), (Red))
Tag Link [Map->Keys] Category Array
Type Member Data Source Any
Support Preferred Version 6.0
Output Type Array Security Tag
Implementation Internal Sets Lasso 6.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