JsonLookup Function

  • Updated

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

 

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.

 

JsonLookup(jsonString, jsonPath)

 

 

Arguments:

 

 

 

jsonString

String - A string expression containing JSON.

 

 

jsonPath

String - A valid JSONPath query.

Syntax 2

 

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.

 

JsonLookup(jsonString, jsonPath, default)

 

 

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.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.