Skip to main content

LINSERT

Insert an element before or after another element in a list
1 min read

Arguments#

keystringrequired#

The key of the list.

directionbefore | afterrequired#

Whether to insert the element before or after pivot.

pivotTValuerequired#

The element to insert before or after.

valueTValuerequired#

The element to insert.

Response#

integerrequired

The list length after insertion, 0 when the list doesn't exist or -1 when pivot was not found.

Was this page helpful?