$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?
5 out of 5 stars

1 rating

5 Stars 100%
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.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese