How to ask whether an array contains a specific element

92 views
Skip to first unread message

jcs

unread,
Feb 17, 2012, 7:44:06 PM2/17/12
to liquid-t...@googlegroups.com
What's the simplest way to do something like a member? function, as:
{% if users_array contains "John" %}
  Hey, John is logged in!
{% endif %}
where users_array is something like: ["Jeff" "John" "Dave" ...]
Reply all
Reply to author
Forward
0 new messages