I have an output as follows:
[{ 'stderr': 'error: cannot open file', }, { 'stderr': '', }]
Jinja snipper:
{{ php_command_result.results | map(attribute='stderr') | sort | join('\r - ') }}"
Returns the final - at the end, because stderr empty. How to ignore empty values?
source share