Lookup
Lookup(association, key)
return the value in the
association
which is associated with thekey
. If no value is available returnMissing("KeyAbsent",key)
.
Lookup(association, key, defaultValue)
return the value in the
association
which is associated with thekey
. If no value is available returndefaultValue
.
Examples
>> Lookup(<|a -> 11, b -> 17|>, a)11
>> Lookup(<|a -> 1, b -> 2|>, c)Missing(KeyAbsent,c)
>> Lookup(<|a -> 1, b -> 2|>, c, 42)42
Related terms
Association, AssociationQ, Counts, Keys, KeySort, Values
Implementation status
- ✅ - full supported