Summary
Fills part of an array with a value.
Description
Fills all the elements of an array from a start index to an end index with a static value.
Route
No Northbound API Available
Roles
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
arr |
array |
yes |
The array to fill |
value |
* |
yes |
Value to fill an array |
start |
number |
no |
Start index, defaults to zero |
end |
number |
no |
End index, defaults to this.length |
Copied to Clipboard
{
"arr": [
"a",
"b",
"c",
"d"
],
"value": "NewDevice",
"start": 1,
"end": 3
}
Copied to Clipboard
{
"type": "object",
"properties": {
"arr": {
"title": "arr",
"type": "array",
"items": [
{
"type": [
"string",
"number",
"integer",
"object",
"array",
"boolean",
"null"
]
}
],
"examples": [
[
"a",
"b",
"c",
"d"
]
]
},
"value": {
"type": [
"array",
"string",
"boolean",
"integer",
"number",
"object"
],
"title": "value",
"examples": [
"NewDevice"
]
},
"start": {
"title": "start",
"type": "integer",
"examples": [
1
]
},
"end": {
"title": "end",
"type": "integer",
"examples": [
3
]
}
},
"required": [
"arr",
"value"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
filledArray |
array |
The modified array |
Copied to Clipboard
[
"a",
"NewDevice",
"NewDevice",
"d"
]
Copied to Clipboard
{
"title": "filledArray",
"type": "array",
"items": [
{
"type": [
"string",
"number",
"integer",
"object",
"array",
"boolean",
"null"
]
}
],
"examples": [
[
"a",
"NewDevice",
"NewDevice",
"d"
]
]
}