Targeted Array :: Overwrite a Value with a Boolean
using Targeted JSON Pointer..
ASTER::ACTION::JSON::TGT Array… Use a Boolean to overwrite a value
Overwrite data in the specified array elements with
Boolean
type
This feature is not Batch Assign.
Please use the Targeted JSON Pointer feature in advance to save the path to the array data in ASTER
.
After ASTER confirms that the data type at the specified path is an array, it will overwrite the values in the specified array elements with Boolean
.
Parameter.1
In advance, set the target path to an “array” using the JSON Pointer
with the set targeted JSON Pointer command.
Here is a sample. The Targeted JSON Pointer is set as follows.
"/test/izArray"
The JSON currently loaded in memory is as follows.
{
"test":{
"izArray":[
0,
1,
2,
true
]
}
}
A parameter to specify an array element in the above sample is as follows.
3
As a result of specifying the array element with the above parameter, izArray[3]
became the target for data overwrite.
Parameter.2
Specify the Boolean with a numeric value.
Mapping: 1
= true
| 0
= false
.
Here is a sample parameter that specifies false
.
0
As a result of Parameter 1
and Parameter 2
, the command izArray[3] = false;
will be executed.
Note
There is no type checking during overwriting.
This command overwrites with Boolean
even if the data types do not match. Below is a sample.
izArray[0] = 0;
izArray[1] = 1;
izArray[2] = 2;
izArray[3] = false;
In the above example, izArray[2]
was a number, but it is overwritten by the Boolean
value with the command izArray[2] = true;
. As a result, …
izArray[0] = 0;
izArray[1] = 1;
izArray[2] = true;
izArray[3] = false;