Skip to content

#keysFrom

Returns an array of the property names of an object.

#keysFrom(object)
Category ObjectsValid in Property value
Name Type Description
object path | object The object to read.

array

source.json
{
"obj": { "a": 1, "b": 2 }
}
transformer.json
{
"result": "#keysFrom($.obj)"
}
output.json
{
"result": [ "a", "b" ]
}

Try it in the playground →

#valuesFrom · #nameOf