# 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 }}