Explorer

definy.json-get-strings

description
The strings in the array of the key of a JSON object. none if it is not an array
type
Fn(value: @definy.json, key: String) -> Union{#none, #some(List<String>)}
expression
fn(value$0, key$1) =>
  match @definy.json-get(value: $0, key: $1) {
    #some(found$2) =>
      match $2 {
        #array(items$3) =>
          #some(@definy.json-strings(items: $3, index: 0)),
        _ =>
          #none
      },
    #none(_) =>
      #none
  }
visibility
public
definy.json-get-strings (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: -VN_065RN_VWoyIsSzbJHr7H-svOctJsXj1azDFEktQ
content hash: uUmdfLf-taQA-rSDMokg6-qtizpY1Zw6gyqeZwGCHh8