Announcement Announcement Module
Collapse
No announcement yet.
g:each: Show property only once Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • g:each: Show property only once

    Hello,

    I have my list of items which I get via findBy() - and pass it to my view. Via g:each, this looks like the following:

    2010/09/15: One
    2010/09/15: Two
    2010/09/15: Three

    How can I manage to output it like this?

    2010/09/15
    - One
    - Two
    -Three

    Thanks in advance!
    Best,
    Silvan

  • #2
    The Groovy groupBy() method would probably help here. Group the items by the date and pass the resulting map in the model.

    Comment

    Working...
    X