kestra-io / kestra

:zap: Open-source workflow automation platform. Orchestrate code in any language, run anywhere, 500+ plugins. Alternative to Airflow, n8n, Rundeck, Camunda, Jenkins...
https://kestra.io
Apache License 2.0
9.68k stars 801 forks source link

Add a function to process json object #993

Closed Melkaz closed 4 months ago

Melkaz commented 1 year ago

Feature description

Could we add a function (e.g. startsWith) to transform this syntax:

"{{ outputs['my-task'].outputFiles | jq('with_entries(select(.key | startswith(\"my-folder/\")))') | first }}"

into: "{{ outputs['my-task'].outputFiles | startsWith('my-folder/') | first }}"

Thanks 🌈

anna-geller commented 4 months ago

done in 0.17.0 that will be released today https://develop.kestra.io/docs/concepts/expression/filter/string#startswith