Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

Dictionary.HasKey

Checks if the given key exists in dictionary.

Component Version macOS Windows Linux Server iOS SDK
Dictionary 5.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Dictionary.HasKey"; DictionaryRef; Key )   More

Parameters

Parameter Description Example
DictionaryRef The reference number to the dictionary. $dic
Key The key to use. Keys are case sensitive. Also keys must be text and should be single line. "FirstName"

Result

Returns 1, 0 or error.

Description

Checks if the given key exists in dictionary.

Examples

Checks if some values are there:

$hasText = MBS("Dictionary.HasKey"; $Param; "text")
$hasFun = MBS("Dictionary.HasKey"; $Param; "fun")

See also

Example Databases

Created 12nd December 2014, last changed 1st March 2021


Dictionary.FromJSON - Dictionary.KeyAtIndex

Feedback: Report problem or ask question.