Typeahead templating, if/else
问题 thanks for the help on this question: Typeahead result formatting, this is a follow up. My JSON looks like [{ name="Long Island", type="2", id="1234"}, { name="New York", type="1", id="5678"}] In the drop down list I need to be able to seperate type 1 from type 2, so Type 1 heading type 1 item type 1 item* Type 2 heading type 2 item type 2 item If there are no results for type 1, then don't show the heading. Same for type 2. Is this possible with typeahead and a templating engine? I'm using