---
title: "Map data from an external source to a component"
slug: "map-data-from-an-external-source-to-a-component"
abstract: "Map the attributes of your element with the properties of an external data source."
---
# Map data from an external source to a component

To map data from an external source to a component:

1. Add an element to the component, or click an existing element.
2. In the right-hand pane, in the **Content** section, click the attribute you want to configure for the selected element. For example, for an *Image* element, the attributes that can be configured with mapped data are *Image source*, *Caption*, *Image alternative text*, or *Link*.
3. Click **Mapped** to open the **Data collection** dialog.
4. In the **Data collection** dialog box, in the **Source** step, select the relevant data source from the drop-down list.

    > [!note]
    > If you've previously selected a data source for this component, it is automatically selected when the dialog box appears. Click the Source icon or the Back button at the bottom of the right -hand pane if you need to select a different one.

5. In the **Data collection** dialog box, in the **Path** step, the data tree displays applicable properties that can be used as value for the attribute. Click the appropriate property for the attribute.

    > [!note]
    > Expert users can provide a JSONPath manually: click Expert mode to display the underlying JSONPath query that will be generated by your choice of property, and then specify the [JSONPath](https://www.npmjs.com/package/jsonpath-plus) of the object you want to map.

6. In cases when the data source has multiple records for the same object, and the **Data scope** > **Data collection** is set to **Mapped**, the dialog includes a third step called **Items**.

    When setting up a repeater of the element, you can limit or specify which items of the array should be displayed:

    - Click **All** to repeat the element for all items in the data source collection.
    - Click **Limit** to repeat the element only for the first items in the collection.
    - Click **Specify** to specify which items in the collection to repeat, based on their position in the list.

    After you do this, you can preview in the component's canvas what the repetition will look like based on the chosen data source.

7. Click **Complete**.