def field_of_field

mlbend-huggingface@0.1.1.0 · main.bend:219

import mlbend-huggingface@0.1.1.0/main.bend as MlbendHuggingface
import Base
import bend-kit-json@0.6.1.1/json.bend as Json

219# The field of a field of an item of a JSON array, when the item is there.
220def field_of_field(m: Maybe<&1, Json.Val>, key1: String, key2: String) -> Maybe<&1, Json.Val>:
221  match m:
222    case Some{it}:
223      field_of(field(it, key1), key2)
224    case None{}:
225      None{}

Uses (5)

Used by (1)