keys()
Table of Contents
Overview
The keys() function takes a mapVariable as argument, and returns all the keys in the map in a list format.
Return Type
- List
Syntax
<variable> = <mapVariable>.keys();
Parameter | Description | Data type |
<variable> | Variable which will contain the returned list. | List |
<mapVariable> | The map variable from which the keys will be returned. | KEY-VALUE |
Examples
mapVar = {"Product" : "Zoho Creator", "Version" : 5}; listVar = mapVar.keys(); info listVar; //returns Product,Version
mapVar = {{"Creator", "CRM"} : "Products", "Zoho" : "Company"}; listVar = mapVar.keys(); info listVar; //returns {"Creator", "CRM"}, Zoho
mapVar = {1 : "Number", "a" : "Alphabet"}; listVar = mapVar.keys(); info listVar; //returns 1,a