π¦ Get from list
π¦ Get from list
The Retrieve from a list block allows you to precisely access an element stored in a collection (list/array) by specifying its index.
This block is essential for manipulating structured data, such as extracting a user choice, displaying a specific element of a ranking, or retrieving a previously selected random value.
π₯ Entries
- list (List/Array): The source collection containing the elements to browse.
- index (Number): The numerical position of the element to extract (1 for the first element, 2 for the second, etc.).
π€ Outings
- element (Dynamic variable): The value extracted at the specified index, whose type depends on the contents of the list (text, number, image, etc.).
π‘ Example of use
Scenario: Display the middle name of a list of participants
- You have a
first nameslist containing ["Emma", "Lucas", "ChloΓ©", "Noah"] in your graph. - You want to display only the middle name in a speech bubble.
- Use the Retrieve from list block and connect the
first namesvariable to the list input. - Enter
2in the index entry to target the second element. - The output element returns "Lucas", which you can directly display or use in the rest of the flow.
βοΈ Technical Details
- Error handling: If the index exceeds the list size, the output will be
null(undefined), which may break the flow if not handled downstream. - Indexing: Celestory uses readable numbering (1 = first element) to simplify list manipulation.
Updated on: 04/03/2026
Thank you!
