Previous Next

Set( ) method (JsonArray)
Sets an element of the JsonArray to the specified value. On successful completion, the method returns TRUE.
Return type:
Access:
Applies to:
 
Syntax 
Set( INPUT index AS INTEGER, INPUT value AS CHARACTER )
 
Set( INPUT index AS INTEGER, INPUT value AS COM-HANDLE )
 
Set( INPUT index AS INTEGER, INPUT value AS DATE )
 
Set( INPUT index AS INTEGER, INPUT value AS DATETIME )
 
Set( INPUT index AS INTEGER, INPUT value AS DATETIME-TZ )
 
Set( INPUT index AS INTEGER, INPUT value AS DECIMAL )
 
Set( INPUT index AS INTEGER, INPUT value AS HANDLE )
 
Set( INPUT index AS INTEGER, INPUT value AS INT64 )
 
Set( INPUT index AS INTEGER, INPUT value AS INTEGER )
 
Set( INPUT index AS INTEGER, INPUT value AS LOGICAL )
 
Set( INPUT index AS INTEGER, INPUT value AS LONGCHAR )
 
Set( INPUT index AS INTEGER, INPUT value AS MEMPTR )
 
Set( INPUT index AS INTEGER, INPUT value AS RAW )
 
Set( INPUT index AS INTEGER, INPUT value AS RECID )
 
Set( INPUT index AS INTEGER, INPUT value AS ROWID )
 
Set( INPUT index AS INTEGER, INPUT value AS JsonObject )
 
Set( INPUT index AS INTEGER, INPUT value AS JsonArray )
index
An INTEGER value that indicates the element in the array to be changed. Indexing into JsonArray is 1-based.
A JsonError is raised if index is less than 1, is greater than the length of the JsonArray, or is the Unknown value (?).
value
Indicates the value to which the existing element is to be set. The data type of the element is defined by the data type mapping. If value is the Unknown value (?), the element is set to the JSON null value.
The data type of the JSON value set by this method call depends upon the ABL data type of the value parameter.
Table 140:
Setting an element to an ABL value that maps to a different JSON data type than the current data type changes the elements’s data type. The following code sample sets iType to JsonDataType:BOOLEAN:
 
idx = myArray:Add(“Hello World”).
lSuccess = myArray:Set(idx, TRUE).
iType = myArray:GetType(idx).

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.