Explorer

definy.json-get

description
The value of the key of a JSON object. none if it is not an object or has no such key
type
Fn(value: @definy.json, key: String) -> Union{#none, #some(@definy.json)}
expression
fn(value$0, key$1) =>
  match $0 {
    #object(fields$2) =>
      @definy.json-fields-get(fields: $2, key: $1, index: 0),
    _ =>
      #none
  }
visibility
public
definy.json-get (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: CKlgzLADr_ma8WfdWdeg7Cflmcve_1OqhfiqxTATvXw
content hash: mb74bMNo6UgirukEKFd8Bi-LjW406Pjdbq4I329BZkQ