AmongKeysOfArray

Typeoperator
DictionaryLCB
LibraryLiveCode Builder
Syntax
<Needle> ( is not | is ) among the keys of <Target>
Associationscom.livecode.array
Summary

Determines if an array has a given key

Parameters
NameTypeDescription
Needle

An expression which evaluates to an integer, string, or list of integers.

Target

An expression which evaluates to an array.

Example
variable tArray as Array
put "value" into tArray["key"]

variable tIsAmong as Boolean
put "key" is among the keys of tArray into tIsAmong -- tIsAmong is true
Values
NameTypeDescription
return

Returns true if Needle can be found among the keys of Target.

RelatedOperator: IsInList
Description

The keys of an array are case insensitive. Thus tVar is among the keys of tArray is not equivalent to tVar is in (the keys of tArray) as the latter IsInList operation is case sensitive.

Tagsarrays