Choose where you’d like to start

get()

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>);
ParameterDescriptionData 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 returnedAS APPLICABLE

Examples

  
mapVar = {"Product" : "Creator", "Company" : "Zoho"};  
boolVal = mapVar.get("Creator");        //returns null  
newBoolVal = mapVar.get("Product");     //returns Creator  
info boolVal ;  
info newBoolVal ;  

Get Started Now

Execute