HTTP & JSON
jsonKeys
$jsonKeys[]
Returns all top-level keys of the current JSON object as a comma-separated string. Also used within $jsonForEach context to reference the current iteration key.
Syntax
$jsonKeys[]
Return Value
string
A comma-separated list of all top-level keys in the current JSON object. Returns an empty string if the JSON is empty or contains only arrays.
$jsonKeys returns all top-level key names from the JSON object as a comma-separated string. This is useful for introspection, debugging, or dynamic key access. For nested objects, it only returns keys at the current depth. When used inside a $jsonForEach block, it can also reference the current iteration’s key context.
Examples
List all keys in an object
$jsonParse[{"name":"Alice","age":25,"email":"[email protected]"}]
Keys: $jsonKeys[]
// Output: name, age, email
Check if object has any keys
$jsonParse[$httpResult]
$if[$jsonKeys[]==]
Response is empty!
$else
Found keys: $jsonKeys[]
$endif
Iterate using keys
$jsonParse[{"name":"Alice","age":25}]
$var[keys;$jsonKeys[]]
$textSplit[keyList;$var[keys];,]
$var[count;$arrayCount[keyList]]
// Process each key manually