distinct

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,

ParameterData typeDescription
<variable>LISTVariable 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);
 infoproductVersion.distinct();// Returns 5, 2
 products=collection("Creator","CRM","CRM");
 infoproducts.distinct();// Returns "Creator", "CRM"