keys

Returns an array of the keys of the given object

Arguments

  • object - The object to get the keys from

Example

Given scope

{
  "testObject": {
    "test1": "someVal",
    "test2": "anotherVal"
  }
}

for query

{
  "$template": {
    "test": "{{keys(testObject)}}"
  }
}

the result will be

[
  "test1", "test2"
]