I am trying to create a very basic static list to iterate through. One of the values has a space in it. I can't figure out how to add the item to the list with a space. In the example below, I can't add trash truck in this manner. I think there must be a special symbol I need to include.

<aura:iteration items="boat, car, trash truck" var="Field3">
                        <option value="{!Field3}">{!Field3}</option>

1 Answer 1


Store them in their own list of strings and then iterate over the list and you should achieve the result you're looking for

<aura:attribute name="vehicles" type="String[]" default="['boat','car','trash truck']"/>
<aura:iteration items="{!v.vehicles}" var="Field3">
    <option value="{!Field3}">{!Field3}</option>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .