GetNames Method (JSONDATA)
10.8, PLBCMP GUI Only
The GetNames method returns the JSON field names in a JSONDATA object when the JSON key specifies the field key name for a JSONDATA object. If the {name} parameter is NULL, this function returns all of the JSON field names in the JSONDATA object. This method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A JSONDATA object previously declared.
return
Optional. A Character Variable that returns the names of JSON fields in a JSONDATA object. All of the field names being returned are separated by a comma character delimiter.
name
Required. A Character String Variable or literal that specifies a JSON field name for a JSONDATA object.
index1
Optional. A Numeric Variable, decimal number, or Numeric expression that defines the first index of a JSON array that is being accessed.
index2
Optional. A Numeric Variable, decimal number, or Numeric expression that defines the second index of a JSON multi-dimensioned array that is being accessed.
index3
Optional. A Numeric Variable, decimal number, or Numeric expression that defines the third index of a JSON multi-dimensioned array that is being accessed.
Flags Affected: EOS, OVER, ZERO
Notes:
The EOS flag is set if the output JSON string is truncated because the {return} variable is too small.
The ZERO and OVER flags are always cleared.
At runtime, the tokens $1, $2, and $3 that appear in the {name} parameter are replaced with the numeric values of the corresponding {index1}, {index2}, or {index3} parameters.
If an error occurs, the JSONDATA object method 'SyntaxError' can be used to retrieve that last error that was generated.
See Also: Method Syntax, JSONDATA Methods
![]() |