Skip to main content

LINSERT

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

Arguments#

keystrrequired#

The key of the list.

direction"BEFORE" | "AFTER"required#

Whether to insert the element before or after pivot.

pivotAnyrequired#

The element to insert before or after.

valueAnyrequired#

The element to insert.

Response#

intrequired

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

Was this page helpful?