2016-09-12 10:30:05 +02:00
|
|
|
{
|
|
|
|
"name": "array_insert",
|
|
|
|
"type": "function",
|
2020-07-02 01:46:48 +01:00
|
|
|
"groups": ["Arrays"],
|
2016-09-12 10:30:05 +02:00
|
|
|
"description": "Returns an array with the given value added at the given position.",
|
2022-01-07 08:33:29 -05:00
|
|
|
"arguments": [{
|
|
|
|
"arg": "array",
|
|
|
|
"description": "an array"
|
|
|
|
}, {
|
|
|
|
"arg": "pos",
|
|
|
|
"description": "the position where to add (0 based)"
|
|
|
|
}, {
|
|
|
|
"arg": "value",
|
|
|
|
"description": "the value to add"
|
|
|
|
}],
|
|
|
|
"examples": [{
|
|
|
|
"expression": "array_insert(array(1,2,3),1,100)",
|
|
|
|
"returns": "[ 1, 100, 2, 3 ]"
|
|
|
|
}],
|
|
|
|
"tags": ["array", "added", "position"]
|
2016-09-12 10:30:05 +02:00
|
|
|
}
|