def path
import cswap-bend-cli@0.1.0.0/fmt/shape.bend as Shapeimport Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
37# The value at a key path; null when any step is missing.
38def path(ks: List<&2, String>, +j: Json.Json) -> Json.Json:
39 match ks:
40 case Nil{}:
41 j
42 case Con{k, t}:
43 path(t, get_or_null(j, k))