Select$
Select$
is used to select properties in a parsed JSON.
Syntax
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.
Example
# 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
Notes
The syntax for JSON_PATH
is based on the XML XPath design.