Formula - JsonPathKey
Section titled “ Formula - JsonPathKey”The jsonPathKey Formula function returns the property names (keys), not the values, of the JSON nodes that match a JSONPath expression.

Animated walkthrough: on the JSON Order Received event of order ORD-10005 in the Order-to-Cash demo, jsonPath with $.shipTo.* returns the address values; jsonPathKey with the same expression returns the property names zip, country, city, street, and region.
Syntax
Section titled “ Syntax”jsonPathKey('expression', content)Parameters
Section titled “Parameters”| Parameter | Required | Description |
|---|---|---|
'expression' |
Yes | A JSONPath expression in single quotes that selects the properties whose names you want, such as '$.paths.*' for every property directly under paths. |
content |
Yes | The JSON text: body, context, or the result of another function (see Formula language rules). |
Returns
Section titled “Returns”The name of every property the expression selects, one value each; duplicates are collapsed. When nothing matches, nothing is returned.
To return the values of the same properties, use jsonPath with the same expression.
Examples
Section titled “ Examples”Example 1: List the API paths in a Swagger document
Section titled “Example 1: List the API paths in a Swagger document”The message body is the OpenAPI 3.0.4 document that the Nodinite Web API publishes at https://<web api>/swagger/v1/swagger.json (shortened here):
{ "openapi": "3.0.4", "info": { "title": "Nodinite.WebAPICore", "version": "1.0" }, "paths": { "/api/ActiveDirectoryGroups": { "get": { "tags": [ "ActiveDirectoryGroups" ] } }, "...": {} }}Formula
Section titled “Formula”jsonPathKey('$.paths.*', body)Result
Section titled “Result”/api/ActiveDirectoryGroups/api/ActiveDirectoryGroups/{id}/api/ActiveDirectoryGroups/GetByFullName/api/ActiveDirectoryGroups/IsNameAvailable/api/ActiveDirectoryGroups/{id}/IsNameAvailable/api/ActiveDirectoryGroups/{id}/Restore...
Each key under paths is returned as its own value, in the case the routes are declared; the full 7.12 document gives 735 unique matches.
Example 2: List the fields of an order
Section titled “Example 2: List the fields of an order”{ "order": { "id": "PO-1001", "customer": "ACME", "total": 250 } }Formula
Section titled “Formula”jsonPathKey('$.order.*', body)Result
Section titled “Result”idcustomertotal
$.order.* selects every property directly under order; jsonPathKey returns their names, where jsonPath would return PO-1001, ACME, and 250.
jsonPathKeytakes a JSONPath expression, not a regular expression. To filter the returned names by pattern, nest the result in regex, for exampleregex('^/api/alarms', jsonPathKey('$.paths.*', body)).