All links of one day
in a single page.
<Previous day - Next day>

rss_feedDaily RSS Feed
floral_left The Daily Shaarli floral_right
——————————— Friday 24, September 2021 ———————————
ansible - comprehension - list - python -
thumbnail
# filter out all elements not with x > 5
a = [el for el in data if el['x'] > 5]

# get all the 'c' attributes as a list
b = [el['c'] for el in data]

# get all the 'c' attributes for the elements with x > 5
c = [el['c'] for el in data if el['x'] > 5]

In Jinja2:

a: {{ data | selectattr('x', 'gt', 5) | list }}
b: {{ data | map(attribute='c') | list }} 
c: {{ data | selectattr('x', 'gt', 5) | map(attribute='c') | list }} 
-