I have an iteration like this;

<aura:iteration items="{! xy.typeList }" var="sp" indexVar="x" >
    <aura:If isTrue="{!sp.desc}"> 
        {! sp.desc } {! ( greaterthan(subtract(pq.type2.length, 1), x) ? ',' : '' ) }
        <aura:set attribute="else">

I want to print just one 'xxx' if the is false on the iteration. currently if it hits two times, it displays 'xxx xxx'. I just want to display just once

1 Answer 1


There's no way to do that directly in markup. You'll need to massage your data so that the output is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.