Capy-Bearer Documentation

Test for a child

lib call

Capy

has(value : dval, key : string) bool

Description

has(value, key) tests for a child without creating it. It returns false for a missing key or a scalar.

Parameters

value : value to test

key : child key

Return Values

true when the key exists.

Example

Capy

var user := dval({"name": "Ada"})
print(has(user, "name"), " ", has(user, "age"), "\n")