Tag Link | [Map->Size] | Category | Array |
---|---|---|---|
Type | Member | Source Available | No |
Support | Preferred | Version | 5.0 |
Change | Unchanged | Data Source | Any |
Output Type | Integer | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
[Map->Size] returns the number of elements (keys) in the map.
[Map->(Size)]
No Parameters Required.
To return the size of a map:
Use the [Map->Size] tag. The following example returns the number of items in a map of primary color names to HTML color codes.
<?LassoScript
Variable: 'Colors'=(Map: 'red'='#ff0000',
'green'='#00ff00',
'blue'='#0000ff');
Output: $Colors->Size;
?>
3