$FindJSON

$FindJSON

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$FindJSON

Finds data within a JSON record using selection criteria.

Syntax

$findjson(sourceargument-1argument-2, …, argument-n)

Parameters

sourcea field, a variable, a form field or a constant containing a JSON structure
argument-1selection criteria to be searched within the specified source
argument-2secondary selection criteria to be searched within the result just found by the previous selection criteria
argument-nand so on

Return Value

The character string resulting from all arguments searched in succession. If there are no matched criteria or if the source does not contain a well-formed JSON data structure, a $NULL value is returned.

Comments

The source must contain well-formed JSON data according to the JSON protocol; otherwise, a $NULL value is returned by the function.

Example

Given the following JSON file:

out $findjson('{"Example": [123,"XYZ"]}',"Example")

Will produce the output:

[123,"XYZ"]

because the selection criteria was the entire “Example” index. However:

out $findjson('{"Example": [123,"XYZ"]}',"Example[2]")

returns:

"XYZ"

The above example is equivalent to:

out $findjson('{"Example": [123,"XYZ"]}',"Example", "Example[2]")

See Also

$getjson

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish