lookup(keys, key, values)value Type: For any types a, b where Equatable a([a], a, [b]) -> b

Given a list, finds a matching item, and returns the corresponding value from the other list.

This is useful for looking up one column via the value of another, e.g. lookup(Column A, value in A, Column B)

Gives an error if there are zero or multiple matches in the left side.

ExamplesClick an example to insert it
lookup([4, 5, 6], 6, ["a", "b", "c"])"c"
lookup([1, 1, 2, 3], 1, ["a", "b", "c", "d"])error