Get child values
lib callCapy
function values(value : any) any
Description
values(value) returns a new list of the child values. The list is new, and the children are the same objects. Maps use insertion order. Lists use numeric order. A scalar returns a one-item list.
Parameters
value : source value
Return Values
A new list holding the child values themselves.
Example
Capy
var user := {"name": "Ada", "role": "admin"}
var result := values(user)
print(is_list(result), " ", length(result), "\n")
Output
true 2