containKey - map function

containKey()

Overview

The containKey() function takes mapVariable and searchKey as arguments. It returns true if mapVariable contains the searchKey. Otherwise, returns false.

Return Type

  • Boolean

Syntax

<variable> = <mapVariable>.containKey( <searchkey> );
ParameterDescriptionData type
<variable>Variable which will contain the returned boolean value.BOOLEAN
<mapVariable>The map variable in which the key will be searched for.KEY-VALUE
<searchkey>The key to be searched for in the map variable.TEXT

Examples

mapVar = {"Product" : "Creator", "Company" : "Zoho"};
boolVal = mapVar.containKey("product");               //returns false
newBoolVal = mapVar.containKey("Product");        //returns true

Share this post : FacebookTwitter

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

Write to us: support@zohodeluge.com