Skip to main content

getkey

getkey(
@llll ## llll (required)
@key ## symbol (required)
) -> anything

Returns value associated with an llll key. It assumes the llll consists of key-value pairs, and is wrapped at the top level, like so:

[
[ '<key1>' <value1> ]
[ '<key2>' <value2> ]
...
[ '<keyN>' <valueN> ]
]

Arguments

  • @llll [llll]: List to get key of. (required)
  • @key [symbol]: Name of llll key. (required)

Output

Value associated with key [anything]


Usage

$point = [["x" 1.5] ["y" 0.3]];
$x = $point.getkey("x");
$y = $point.getkey("y");
print($x); ## 1.5
print($y) ## 0.3