Skip to content

Iterator

An iterator that would iterate the dataSource and render the values using the child component definition

Name Description
component iterator
dataSource the name/id of the dataSource, this dataSource should be defined in the data.sources section of the layout
list if dataSource is not specified, user can specify a list to be iterate
child a child component definition that this iterator will used to render each items as iterate
head, tail optional components

Examples

{
    "component": "iterator",
    "dataSource": "shopping-cart",
    "child": {
        "component": "layout",
        "id": "22491707-a249-41b1-8316-a174f1503b25"
    }
}

{
    "component": "iterator",
    "list":"1,2,3,4"
    "child": {
        "component": "layout",
        "id": "22491707-a249-41b1-8316-a174f1503b25"
    }
}

{
    "component": "iterator",
    "list": [
        1,2,3,4
    ],
    "child": {
        "component": "layout",
        "id": "22491707-a249-41b1-8316-a174f1503b25"
    }
}