$FindJSON
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
$FindJSON
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Finds data within a JSON record using selection criteria.
Syntax
$findjson(source, argument-1, argument-2, ..., argument-n)
Parameters
source | a field, a variable, a form field or a constant containing a JSON structure |
argument-1 | selection criteria to be searched within the specified source |
argument-2 | secondary selection criteria to be searched within the result just found by the previous selection criteria |
argument-n | and 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
Updated
ByCelso Bressan
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