def lookup
import ezmcp@0.1.0.0/src/openapi.bend as Openapiimport Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value
163# the value of the first member named `key`
164def lookup(ps: List<&2, Mem()>, +key: String) -> Maybe<&2, Value.Json>:
165 match ps:
166 case []:
167 None{}
168 case (k2, val) <> rest:
169 lookup.at(String.eq(k2, key), val, _u => lookup(rest, key))