Capy-Bearer Documentation

Get child keys

lib call

Capy

function keys(value : dval) dval

Description

keys(value) returns a new list of child keys. A scalar returns an empty list.

Parameters

value : source value

Return Values

A list of child keys.

Example

Capy

var user := dval({"name": "Ada", "role": "admin"})
print(join(sort(keys(user)), ","), "\n")