toCollection
Table of Contents
Overview
The toCollection function takes an expression as an argument, and returns a collection.
Return Type
- COLLECTION
Syntax
<variable> = <expression>.toCollection();
where,
Parameter | Data type | Description |
<variable> | COLLECTION | The variable which will contain the converted collection. |
<expression> | TEXT | The text that needs to be converted to a collection. |
Examples
products = "{company:Zoho, product:Deluge}"; info products.toCollection(); // Returns the collection as a key-value pair - {"product":"Creator","company":"Zoho"}
products = "{company, Zoho, product, Deluge}"; info products.toCollection(); // Returns the collection as a list - "product,Creator,company,Zoho"