• #dev 2025-01-28
  • Prev
    Next
  • #indieweb
  • #dev
  • #wordpress
  • #meta
  • #stream
  • #microformats
  • #known
  • #events
#dev ≡
  • ←
  • →
2025-01-28 UTC
# 17:57
btrem
I already had a filter to convert a single item into an array of that item, e.g., `2` becomes `[2]`. So instead of testing if the var is an array of objects, I use that filter to convert my object into an array of objects with 1 member. That makes it easier to code the template: {% for foo in bar | toArray %} ... {%endfor%}.