# Set List Data

## Overview

![The Set List Data Node.](/files/WLtFqqQHyzmt8eogLMjU)

The **Set List Data Node** allows the user to set the data of a [**List**](/incari-studio/2023.1/objects-and-types/scene2d-objects/gui/list.md) in a **Scene2D**.

This **Node** requires that the *JSON* data is in **Array** format. Refer to the [example](#example) at the bottom of the page.

[**Scope**](/incari-studio/2023.1/toolbox/overview.md#scopes): **Scene**, **Function**, **Prefab**.

## Inputs

| Input             | Type         | Description                                                           |
| ----------------- | ------------ | --------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse**    | A standard **Input Pulse**, to trigger the execution of the **Node**. |
| `Object ID`       | **ObjectID** | The **List** that the user wishes to set the data for.                |
| `List Data`       | **Array**    | The *JSON* list data in **Array** format.                             |

## Outputs

| Output             | Type      | Description                                                                                                                            |
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse** | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |

## Example

For correct formatting, start with the desired *JSON* file. Here we have an example:

```
   [
    {
        "icon": "Users/user.name/Documents/Project1/Assets/image1.jpg",
        "text": "you collected"
    },
    {
        "icon": "Users/user.name/Documents/Project1/Assets/image2.png",
        "text": "over 9000"
    },
    {
        "icon": "Users/user.name/Documents/Project1/Assets/image3.png",
        "text": "overhours"
    }
]
```

This needs to be placed into an **Array**. Go into the **Logic Editor** and populate an **Array** with the elements of the desired *JSON* using your preferred method.

The full **Array** would look like this if outputted to the **Console**:

```
[ { icon:Users/user.name/Documents/Project1/Assets/image1.jpg, text:you collected }, { icon:Users/user.name/Documents/Project1/Assets/image2.png, text:over 9000 }, { icon:Users/user.name/Documents/Project1/Assets/image3.png, text:overhours } ]
```

![List Array Example.](/files/iRMW9v0MGwqRKWW84Zau)

Each element is encapsulated by `{}` symbols, like in the *JSON*. The `""` are not necessary here. Simply use an A:B format with a comma separating the lines of each element.

The resulting **List** should look like this in the **Player**:

![Set List Output Example.](/files/fc54YD3b03zhBuz2CUJ9)

## See Also

* [**Get List Data**](/incari-studio/2023.1/toolbox/incari/list2d/getlistdata.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.incari.com/incari-studio/2023.1/toolbox/incari/list2d/setlistdata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
