Create New Array (Empty | Data Auto Fill)
using JSON Pointer..
ASTER::ACTION::JSON::Create A New Array: Data Auto Fill Option
An array is created at the path specified by the JSON Pointer.
-
It is a function that creates a new array for data expanded in memory.
-
An option is available to insert data into array elements when creating the array.
Parameter.1
JSON Pointer: Specify the insertion position of the array-type data.
If the key name is duplicated, it will be overwritten.
Create an array under the root with the key name "test", example of JSON Pointer:
"/test"Parameter.2
Array element count
The number of times to add elements to the end of the array and the number of times to insert data = specify the array element count.
As an example of parameters when inserting 3 data items into the array,
3Parameter.3
Specifying the Data Type to be Inserted
0When a value of 0 is given, data is not inserted at the end of the array element. The specification of Parameter.2 is disabled.
The data type to be inserted can be selected from
2types of primitive types and data structure types.There is a dedicated command for Boolean.
| Number | Data Type | Detail |
|---|---|---|
| 0 | None | Ignores the specification of Parameter.2. |
| 1 | Numeric | Sequential numbers starting from 0 are automatically assigned. |
| 2 | String | An empty string "" is automatically assigned. |
| 3 | Array | No initial value, becomes a two-dimensional array. |
| 4 | Object | The initial value {"key":0} is assigned. The numeric type corresponding to the key name is sequential. |
Below are examples of settings and their results for Parameter.3 in relation to Parameter.1 and Parameter.2.
{
"test":[]
}{
"test":[
0,
1,
2
]
}{
"test":[
"",
"",
""
]
}{
"test":[
[],
[],
[]
]
}{
"test":[
{"key":0},
{"key":1},
{"key":2}
]
}