Capy-Bearer Documentation

Get a named child

lib call

Capy

function get(value : dval, key : string) dval

Description

get(value, key) reads a named child without creating it. It returns none for a missing key or a scalar.

Parameters

value : source value

key : child key

Return Values

The copied child, or none.

Example

Capy

var user := dval({"email": "ada@example.test"})
print(get(user, "email"), "\n")