Lodol Docs

Lists by Lodol

API actions for the Lists by Lodol integration.

Lists by Lodol

Manage and manipulate lists using Lodol's built-in Lists provider.


Append to list

Add a value to the end of a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to add to. A new list is returned.
valueobjectYesThe item to add to the end.

Response

{
  "status": "success"
}

Find index

Find the position of a value in a list. Returns -1 if not found.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to search.
valueobjectYesThe item to find. Returns its 0-based index, or -1 if not found.

Response

{
  "status": "success"
}

Insert into list

Insert a value at a specific position in a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to insert into.
indexnumberYes0-based position where the item should be inserted.
valueobjectYesThe item to insert.

Response

{
  "status": "success"
}

List length

Get the number of items in a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to measure the length of.

Response

{
  "status": "success"
}

List contains

Check if a list includes a specific value.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to search.
valueobjectYesThe item to look for. Returns true if found.

Response

{
  "status": "success"
}

Remove item at index

Remove the item at a specific index from a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to remove an item from.
indexnumberYes0-based index of the item to remove.

Response

{
  "status": "success"
}

Remove duplicates

Remove duplicate values from a list, keeping the first occurrence.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to deduplicate. Keeps the first occurrence of each value.

Response

{
  "status": "success"
}

Reverse list

Reverse the order of items in a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to reverse. Returns a new list in the opposite order.

Response

{
  "status": "success"
}

Slice list

Extract a portion of a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to extract items from.
startnumberYes0-based start index (inclusive). Negative values count from the end.
endnumberYes0-based end index (exclusive). Negative values count from the end.

Response

{
  "status": "success"
}

Sort list

Sort a list in ascending order.

Parameters

ParameterTypeRequiredDescription
itemsarrayYesThe list to sort in ascending order.

Response

{
  "status": "success"
}

On this page