[Map->Find] returns the value for the key that matches the parameter. Accepts a single parameter of any data type.
If no keys in the map match the parameter to the [Map->Find] tag then Null is returned.
[Map->(Find: 'Key Value')]
Use the [Map->Find] tag. The following example retrieves the value for the key 'blue' from a map of color names to HTML color codes.
<?LassoScript
Variable: 'Colors'=(Map: 'red'='#ff0000',
'green'='#00ff00',
'blue'='#0000ff');
Output: $Colors->(Find: 'blue');
?>
#0000ff
Tag Link | [Map->Find] | Category | Array |
---|---|---|---|
Type | Member | Data Source | Any |
Support | Preferred | Version | 5.0 |
Output Type | Any | Security | None |
Implementation | Internal | Sets | 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