Skip to main content



JsonLookup Function

The JsonLookup function returns the JSON of the first property or array that matches a given search path. Does not support retrieving an array of primitive values.

Syntax 1​

JsonLookup(jsonString, jsonPath)

The JsonLookup function returns the JSON of the first property or array that matches a given search path. Does not support retrieving an array of primitive values.

Arguments​

jsonString String - A string expression containing JSON.

jsonPath String - A valid JSONPath query.

Syntax 2​

JsonLookup(jsonString, jsonPath, default)

The JsonLookup function returns the JSON of the first property or array that matches a given search path. Does not support retrieving an array of primitive values.

Arguments​

jsonString String - A string expression containing JSON.

jsonPath String - A valid JSONPath query.

default String - The default return value if the path is not found.

Remarks​

Example:

JsonLookup(JsonDocument1, $.Manufacturers[?(@.Name == 'Acme Co')], "Not found");  
// returns only Manufacturers with a Name matching the query filter of 'Acme Co', or "Not Found" if no matching Manufacturers were returned.