def find
import emerging-ezjson@1.3.0.0/src/value.bend as Valueimport Base
317# the value of a key in a chain of pairs; JNull when the key is absent
318def find(cells: Json, +key: String) -> Json:
319 match cells:
320 case JPair{k, v, r}:
321 find.at(r, key, find.eq(k, key), v)
322 case JBind{src, n, v, r}:
323 find.at(r, key, span.eq(src, n, key), v)
324 case other:
325 JNull{}