Select$ is used to select properties in a parsed JSON.
RETURN_VALUE = JSON_OBJECT.Select$(JSON_PATH)
RETURN_VALUE is a string that contains the information returned by the Select$ query.JSON_OBJECT is a string variable that contains the path to the file you want to rename.JSON_PATH is the JSON PATH expression that contains the query to be selected from the JSON object.# Procedure to select a property
Local Clbfile SRCJSON
SRCJSON = '{"msg":"Hello World!"}'
# Create the object
Local Instance OBJ Using OBJECT
# Parse the object
ParseInstance OBJ With SRCJSON
# Select the property
Local Char MYSTR(30)
MYSTR = OBJ.Select$("$.msg")
FreeGroup OBJ
| Value | Explanation |
|---|---|
| 0 | Operation succeeded. |
| -6 | The name of the variable does not exist in the JSON document. |
| -26 | Invalid JSON document. |
| -70 | Invalid argument type. |
The syntax for JSON_PATH is based on the XML XPath design.