Summary
Shifts the array by one.
Description
Removes the first element from an array. This method changes the length of the array.
Route
No Northbound API Available
Roles
Parameters
DetailsExampleSchema
| Name |
Type |
Required |
Description |
| arr |
array |
yes |
The array to shift |
Copied to Clipboard
{
"arr": [
"a",
"b",
"c"
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"arr": {
"title": "arr",
"type": "array",
"items": [
{
"type": [
"string",
"number",
"integer",
"object",
"array",
"boolean",
"null"
]
}
],
"examples": [
[
"a",
"b",
"c"
]
]
}
},
"required": [
"arr"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
| Name |
Type |
Description |
| shiftedArray |
array |
The shifted array; undefined if the array is empty |
Copied to Clipboard
[
"b",
"c"
]
Copied to Clipboard
{
"title": "shiftedArray",
"type": "array",
"items": [
{
"type": [
"string",
"number",
"integer",
"object",
"array",
"boolean",
"null"
]
}
],
"examples": [
[
"b",
"c"
]
]
}