Suppose I have a CSV table in /_data/people.csv
:
name,surname,meeting
Bob,Marley,
Billy,Joe,2021-03-12
Charles,Dickens
If I want to skip entries which contain the “meeting” field, and enter only the ones which have it empty, I would write:
<ul>
{% for person in site.data.people %}
{% if person.meeting == '' %}
<li>{{ person.name }}</li>
{% endif %}
{% endfor %}
</ul>
No entry shows up, I should see Bob and Charles, instead.
It does not work even in this way:
<ul>
{% for person in site.data.people %}
{% unless person.meeting %}
<li>{{ person.name }}</li>
{% endunless %}
{% endfor %}
</ul>
or this way:
<ul>
{% for person in site.data.people %}
{% if person.meeting %}
<li>{{ person.name }}</li>
{% endif %}
{% endfor %}
</ul>
or this way:
<ul>
{% for person in site.data.people %}
{% if person.meeting == nil %}
<li>{{ person.name }}</li>
{% endif %}
{% endfor %}
</ul>
What can I do?
Thank you very much!