> For the complete documentation index, see [llms.txt](https://docs.codelessly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codelessly.com/codelessly-cloudui/connecting-data.md).

# Connecting Data

## JSON Paths

The first step to connect data to a node is to declare the data's path in the node itself. We do it by placing the JSON path in between `${ }`. It looks something like this:

```dart
${books.chapters.titles[0]}
```

In case of the example weather app, we declare the JSON path that points to a temperature.

<figure><img src="/files/MFE6vD5uk56No38OP2oH" alt=""><figcaption><p>Dynamic Temperature</p></figcaption></figure>

Next up, providing the data to the layout in the SDK.

## Data Field

`CodelesslyWidget` takes in data using the `data` parameter which is of type `Map<String, dynamic>`. You can provide the data in the form of a JSON and the widget will be able to use its values internally.

```dart
CodelesslyWidget(
  data: const {
    'weather': {
      'temp': 20,
      'humidity': 34,
      'wind': 6,
    },
  }
);
```

Run the app. It should retrieve `temp`'s value from the data and substitute it in place of the JSON path.

<figure><img src="/files/TKYSmp0hyeKwJiGGPqbe" alt=""><figcaption><p>Dynamic data used in widget</p></figcaption></figure>

Currently, the editor supports adding dynamic data to text and image URLs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.codelessly.com/codelessly-cloudui/connecting-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
