distinct
Table of Contents
Overview
The distinct function returns the unique values (from key value pairs), or unique elements, present in a collection.
Return Type
- LIST
Syntax
<variable> = <collectionVariable>.distinct();
where,
Parameter | Data type | Description |
<variable> | LIST | Variable which will hold the returned list. |
<collectionVariable> | COLLECTION | The variable from which the unique values or unique elements will be returned. |
Examples
productVersion = collection("Creator" : 5, "CRM" : 2, "Mail" : 5); info productVersion.distinct( ); // Returns 5, 2
products = collection("Creator", "CRM", "CRM"); info products.distinct( ); // Returns "Creator", "CRM"