get

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"

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com