get()
Table of Contents
Overview
The get() function takes mapVariable and searchKey as arguments. It returns the value mapped to the searchKey in mapVariable.
Note :If the key is not found, the function will return null
Return Type
- The return type will depend on the data type of the returned value.
Syntax
<variable> = <mapVariable>.get(<searchkey>);
Parameter | Description | Data type |
<variable> | Variable which will contain the returned value. | AS APPLICABLE |
<mapVariable> | The map variable from which the value will be returned. | KEY-VALUE |
<searchkey> | The key whose corresponding value will be returned | AS APPLICABLE |
Examples
mapVar = {"Product" : "Creator", "Company" : "Zoho"}; boolVal = mapVar.get("Creator"); //returns null newBoolVal = mapVar.get("Product"); //returns Creator info boolVal ; info newBoolVal ;